cgobjcgnu was making invalid common globals.

llvm-svn: 78161
This commit is contained in:
Chris Lattner 2009-08-05 05:25:18 +00:00
parent d055488c72
commit c58e5699be
1 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ void CGObjCGNU::EmitClassRef(const std::string &className) {
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::GlobalVariable *CGObjCGNU::ObjCIvarOffsetVariable(
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;
}