Fix test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll and

PR472

llvm-svn: 18459
This commit is contained in:
Chris Lattner 2004-12-03 17:19:10 +00:00
parent 7933b74bfe
commit 40e7175e44

View File

@ -858,7 +858,10 @@ bool CWriter::doInitialization(Module &M) {
Out << "\n\n/* Global Variable Declarations */\n";
for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I)
if (!I->isExternal()) {
Out << "extern ";
if (I->hasInternalLinkage())
Out << "static ";
else
Out << "extern ";
printType(Out, I->getType()->getElementType(), Mang->getValueName(I));
if (I->hasLinkOnceLinkage())