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

David Chisnall csdavec at swan.ac.uk
Mon Aug 1 10:36:53 PDT 2011


Author: theraven
Date: Mon Aug  1 12:36:53 2011
New Revision: 136628

URL: http://llvm.org/viewvc/llvm-project?rev=136628&view=rev
Log:
Fix linkage type for tentative definition of ivar offset variables (GNUstep runtime)


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=136628&r1=136627&r2=136628&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Mon Aug  1 12:36:53 2011
@@ -2453,8 +2453,8 @@
     llvm::Value *Offset = TheModule.getGlobalVariable(name);
     if (!Offset)
       Offset = new llvm::GlobalVariable(TheModule, IntTy,
-          false, llvm::GlobalValue::CommonLinkage,
-          0, name);
+          false, llvm::GlobalValue::LinkOnceAnyLinkage,
+          llvm::Constant::getNullValue(IntTy), name);
     return CGF.Builder.CreateLoad(Offset);
   }
   uint64_t Offset = ComputeIvarBaseOffset(CGF.CGM, Interface, Ivar);





More information about the cfe-commits mailing list