aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-11 23:51:59 +0000
committerChris Lattner <sabre@nondot.org>2007-05-11 23:51:59 +0000
commita26153143e907023f58d4f508630d80c086de098 (patch)
tree55bf002e2421219fb6741839bd908782d1544011 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent79a71ec3adea7678823982148ee03bbb21ffe33f (diff)
downloadllvm-a26153143e907023f58d4f508630d80c086de098.zip
llvm-a26153143e907023f58d4f508630d80c086de098.tar.gz
llvm-a26153143e907023f58d4f508630d80c086de098.tar.bz2
allow partially materialized modules to be written out, which just strips out
the functions which haven't been read. llvm-svn: 36999
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 1ea7633..eddae26 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -256,6 +256,7 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
static unsigned getEncodedLinkage(const GlobalValue *GV) {
switch (GV->getLinkage()) {
default: assert(0 && "Invalid linkage!");
+ case GlobalValue::GhostLinkage: // Map ghost linkage onto external.
case GlobalValue::ExternalLinkage: return 0;
case GlobalValue::WeakLinkage: return 1;
case GlobalValue::AppendingLinkage: return 2;