[llvm-commits] CVS: llvm/lib/Transforms/IPO/Internalize.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Dec 4 21:07:50 PST 2005
Changes in directory llvm/lib/Transforms/IPO:
Internalize.cpp updated: 1.26 -> 1.27
---
Log message:
Wrap a long line, never internalize llvm.used.
---
Diffs of the changes: (+6 -2)
Internalize.cpp | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
Index: llvm/lib/Transforms/IPO/Internalize.cpp
diff -u llvm/lib/Transforms/IPO/Internalize.cpp:1.26 llvm/lib/Transforms/IPO/Internalize.cpp:1.27
--- llvm/lib/Transforms/IPO/Internalize.cpp:1.26 Tue Oct 18 01:29:22 2005
+++ llvm/lib/Transforms/IPO/Internalize.cpp Sun Dec 4 23:07:38 2005
@@ -99,9 +99,13 @@
}
// Mark all global variables with initializers as internal as well...
- for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I)
+ for (Module::global_iterator I = M.global_begin(), E = M.global_end();
+ I != E; ++I)
if (!I->isExternal() && !I->hasInternalLinkage() &&
- !ExternalNames.count(I->getName())) {
+ !ExternalNames.count(I->getName()) &&
+ // *never* internalize the llvm.used symbol, used to implement
+ // attribute((used)).
+ I->getName() != "llvm.used") {
// Special case handling of the global ctor and dtor list. When we
// internalize it, we mark it constant, which allows elimination of
// the list if it's empty.
More information about the llvm-commits
mailing list