Match addPassesToEmitFile API change.

llvm-svn: 70409
This commit is contained in:
Evan Cheng 2009-04-29 21:02:33 +00:00
parent 1971dc7007
commit a97709b66f
1 changed files with 4 additions and 2 deletions

View 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;
}