Apply the scope restrictions after parsing the command line options. There may be...
authorBill Wendling <isanbard@gmail.com>
Mon, 9 Apr 2012 22:18:01 +0000 (22:18 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 9 Apr 2012 22:18:01 +0000 (22:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154348 91177308-0d34-0410-b5e6-96231b3b80d8

tools/lto/LTOCodeGenerator.cpp

index 7620bcb1c1802a179d849e465b7b8954a18c3946..28ede86f212b4bf7f2565830a2e3cd9f989e774b 100644 (file)
@@ -347,9 +347,6 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
   if ( this->determineTarget(errMsg) )
     return true;
 
-  // mark which symbols can not be internalized
-  this->applyScopeRestrictions();
-
   Module* mergedModule = _linker.getModule();
 
   // if options were requested, set them
@@ -357,6 +354,9 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
     cl::ParseCommandLineOptions(_codegenOptions.size(),
                                 const_cast<char **>(&_codegenOptions[0]));
 
+  // mark which symbols can not be internalized
+  this->applyScopeRestrictions();
+
   // Instantiate the pass manager to organize the passes.
   PassManager passes;