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

PR472


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18459 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-12-03 17:19:10 +00:00
parent 8430182d80
commit cc16a8e73b
2 changed files with 8 additions and 2 deletions

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())

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())