allow partially materialized modules to be written out, which just strips out
authorChris Lattner <sabre@nondot.org>
Fri, 11 May 2007 23:51:59 +0000 (23:51 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 11 May 2007 23:51:59 +0000 (23:51 +0000)
the functions which haven't been read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36999 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bitcode/Writer/BitcodeWriter.cpp

index 1ea763360782d4d82eab1c840bb9b0d61d2eb380..eddae26ad0f9154727708d91bfb45ddecc9c9911 100644 (file)
@@ -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;