[cfe-commits] r78161 - /cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

Chris Lattner sabre at nondot.org
Tue Aug 4 22:25:20 PDT 2009


Author: lattner
Date: Wed Aug  5 00:25:18 2009
New Revision: 78161

URL: http://llvm.org/viewvc/llvm-project?rev=78161&view=rev
Log:
cgobjcgnu was making invalid common globals.

Modified:
    cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=78161&r1=78160&r2=78161&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Wed Aug  5 00:25:18 2009
@@ -189,7 +189,7 @@
         llvm::GlobalValue::ExternalLinkage, 0, symbolName);
   }
   new llvm::GlobalVariable(TheModule, ClassSymbol->getType(), true,
-    llvm::GlobalValue::CommonLinkage, ClassSymbol, symbolRef);
+    llvm::GlobalValue::WeakAnyLinkage, ClassSymbol, symbolRef);
 }
 
 static std::string SymbolNameForClass(const std::string &ClassName) {
@@ -1580,7 +1580,7 @@
     llvm::ConstantInt *OffsetGuess =
       llvm::ConstantInt::get(LongTy, Offset, "ivar");
     IvarOffsetGV = new llvm::GlobalVariable(TheModule, LongTy, false,
-        llvm::GlobalValue::CommonLinkage, OffsetGuess, Name);
+        llvm::GlobalValue::WeakAnyLinkage, OffsetGuess, Name);
   }
   return IvarOffsetGV;
 }





More information about the cfe-commits mailing list