forked from OSchip/llvm-project
				
			-disable-opt is not -O0, it's okay for it to disable internalize.
llvm-svn: 17911
This commit is contained in:
		
							parent
							
								
									1154bb6b43
								
							
						
					
					
						commit
						7a3767521d
					
				| 
						 | 
				
			
			@ -153,6 +153,7 @@ int llvm::GenerateBytecode(Module *M, bool Strip, bool Internalize,
 | 
			
		|||
  // arguments).  This pass merges the two functions.
 | 
			
		||||
  addPass(Passes, createFunctionResolvingPass());
 | 
			
		||||
 | 
			
		||||
  if (!DisableOptimizations) {
 | 
			
		||||
    if (Internalize) {
 | 
			
		||||
      // Now that composite has been compiled, scan through the module, looking
 | 
			
		||||
      // for a main function.  If main is defined, mark all other functions
 | 
			
		||||
| 
						 | 
				
			
			@ -160,7 +161,6 @@ int llvm::GenerateBytecode(Module *M, bool Strip, bool Internalize,
 | 
			
		|||
      addPass(Passes, createInternalizePass());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  if (!DisableOptimizations) {
 | 
			
		||||
    // Now that we internalized some globals, see if we can hack on them!
 | 
			
		||||
    addPass(Passes, createGlobalOptimizerPass());
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -163,7 +163,8 @@ int main(int argc, char **argv, char **envp) {
 | 
			
		|||
    std::string ModuleID("gccld-output");
 | 
			
		||||
    std::auto_ptr<Module> Composite(new Module(ModuleID));
 | 
			
		||||
 | 
			
		||||
    // We always look first in the current directory when searching for libraries.
 | 
			
		||||
    // We always look first in the current directory when searching for
 | 
			
		||||
    // libraries.
 | 
			
		||||
    LibPaths.insert(LibPaths.begin(), ".");
 | 
			
		||||
 | 
			
		||||
    // If the user specified an extra search path in their environment, respect
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue