[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Dec 3 09:19:22 PST 2004
Changes in directory llvm/lib/Target/CBackend:
Writer.cpp updated: 1.211 -> 1.212
---
Log message:
Fix test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll and
PR472: http://llvm.cs.uiuc.edu/PR472
---
Diffs of the changes: (+4 -1)
Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.211 llvm/lib/Target/CBackend/Writer.cpp:1.212
--- llvm/lib/Target/CBackend/Writer.cpp:1.211 Thu Dec 2 13:02:49 2004
+++ llvm/lib/Target/CBackend/Writer.cpp Fri Dec 3 11:19:10 2004
@@ -858,7 +858,10 @@
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())
More information about the llvm-commits
mailing list