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

llvm-svn: 6931
This commit is contained in:
Chris Lattner 2003-06-28 17:08:36 +00:00
parent de025f3220
commit 90921a7eee
1 changed files with 2 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());