Wrap a long line, never internalize llvm.used.
authorChris Lattner <sabre@nondot.org>
Mon, 5 Dec 2005 05:07:38 +0000 (05:07 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 5 Dec 2005 05:07:38 +0000 (05:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24602 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/Internalize.cpp

index eeee63b98938f97ccb1a4e7467d015bf93991775..cd1eda71dc69ce437746516238c93b91de13bc19 100644 (file)
@@ -99,9 +99,13 @@ namespace {
         }
 
       // 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.