Fix bug: CBackend/2003-06-28-LinkOnceGlobalVars.llx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6931 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-06-28 17:08:36 +00:00
parent a4610ec6ba
commit 76d9f1b467
2 changed files with 4 additions and 0 deletions

View File

@ -682,6 +682,8 @@ void CWriter::printModule(Module *M) {
if (I->hasInternalLinkage())
Out << "static ";
printType(Out, I->getType()->getElementType(), getValueName(I));
if (I->hasLinkOnceLinkage())
Out << " __attribute__((common))";
if (!I->getInitializer()->isNullValue()) {
Out << " = " ;
writeOperand(I->getInitializer());

View File

@ -682,6 +682,8 @@ void CWriter::printModule(Module *M) {
if (I->hasInternalLinkage())
Out << "static ";
printType(Out, I->getType()->getElementType(), getValueName(I));
if (I->hasLinkOnceLinkage())
Out << " __attribute__((common))";
if (!I->getInitializer()->isNullValue()) {
Out << " = " ;
writeOperand(I->getInitializer());