Fix linkage type for tentative definition of ivar offset variables (GNUstep runtime)

llvm-svn: 136628
This commit is contained in:
David Chisnall 2011-08-01 17:36:53 +00:00
parent 89f138ae63
commit 28dc7f94f8
1 changed files with 2 additions and 2 deletions

View File

@ -2453,8 +2453,8 @@ llvm::Value *CGObjCGNU::EmitIvarOffset(CodeGenFunction &CGF,
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);