]> granicus.if.org Git - clang/commitdiff
Match addPassesToEmitFile API change.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 29 Apr 2009 21:02:33 +0000 (21:02 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 29 Apr 2009 21:02:33 +0000 (21:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70409 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-cc/Backend.cpp

index 2d8ca82e2f1c2c7173af89c8dbb1d3c62f73e295..078c7a1fb9edfd6f057ce5b03e1ffcfd3453196e 100644 (file)
@@ -260,7 +260,8 @@ bool BackendConsumer::AddEmitPasses(std::string &Error) {
     // Normal mode, emit a .s file by running the code generator.
     // Note, this also adds codegenerator level optimization passes.
     switch (TM->addPassesToEmitFile(*PM, *AsmOutStream,
-                                    TargetMachine::AssemblyFile, Fast)) {
+                                    TargetMachine::AssemblyFile,
+                                    CompileOpts.OptimizationLevel)) {
     default:
     case FileModel::Error:
       Error = "Unable to interface with target machine!\n";
@@ -269,7 +270,8 @@ bool BackendConsumer::AddEmitPasses(std::string &Error) {
       break;
     }
     
-    if (TM->addPassesToEmitFileFinish(*CodeGenPasses, 0, Fast)) {
+    if (TM->addPassesToEmitFileFinish(*CodeGenPasses, 0,
+                                      CompileOpts.OptimizationLevel)) {
       Error = "Unable to interface with target machine!\n";
       return false;
     }