aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode
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
commit384003d2c0d222fcfbf0d771cc43786a18119e3a (patch)
treebcb1c5f029e650733a989479ea033e2991cb4834 /lib/Bitcode
parent1e4c23a2d192479d264e2028843f204de2658cda (diff)
allow partially materialized modules to be written out, which just strips out
the functions which haven't been read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index 1ea7633607..eddae26ad0 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/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;