]> granicus.if.org Git - llvm/commitdiff
Allow the user to disable the internalize pass
authorChris Lattner <sabre@nondot.org>
Wed, 16 Apr 2003 21:43:22 +0000 (21:43 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 16 Apr 2003 21:43:22 +0000 (21:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5792 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gccld/gccld.cpp

index 5d1a35f8a884da1a95a386e0d2ea1dfac59a5068..b8b3587938668c5825e77d4f28dda9204488e921 100644 (file)
@@ -52,6 +52,10 @@ Libraries("l", cl::desc("Specify libraries to link to"), cl::Prefix,
 static cl::opt<bool>
 Strip("s", cl::desc("Strip symbol info from executable"));
 
+static cl::opt<bool>
+NoInternalize("disable-internalize",
+              cl::desc("Do not mark all symbols as internal"));
+
 
 // FileExists - Return true if the specified string is an openable file...
 static inline bool FileExists(const std::string &FN) {
@@ -153,10 +157,13 @@ int main(int argc, char **argv) {
   //
   Passes.add(createFunctionResolvingPass());
 
-  // Now that composite has been compiled, scan through the module, looking for
-  // a main function.  If main is defined, mark all other functions internal.
-  //
-  Passes.add(createInternalizePass());
+  if (!NoInternalize) {
+    // Now that composite has been compiled, scan through the module, looking
+    // for a main function.  If main is defined, mark all other functions
+    // internal.
+    //
+    Passes.add(createInternalizePass());
+  }
 
   // Now that we have optimized the program, discard unreachable functions...
   //