From 306a6aa6a2017d91e2f5ec1b1fc39cc006c60958 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 29 Apr 2009 21:02:33 +0000 Subject: [PATCH] Match addPassesToEmitFile API change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70409 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/clang-cc/Backend.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/clang-cc/Backend.cpp b/tools/clang-cc/Backend.cpp index 2d8ca82e2f..078c7a1fb9 100644 --- a/tools/clang-cc/Backend.cpp +++ b/tools/clang-cc/Backend.cpp @@ -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; } -- 2.40.0