Lift addAssemblyEmitter into LLVMTargetMachine.

- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75859 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2009-07-15 23:34:19 +00:00
parent e017fd1b20
commit 5d77cad60b
24 changed files with 19 additions and 163 deletions

View File

@@ -92,6 +92,17 @@ LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
return FileModel::Error;
}
bool LLVMTargetMachine::addAssemblyEmitter(PassManagerBase &PM,
CodeGenOpt::Level OptLevel,
bool Verbose,
formatted_raw_ostream &Out) {
FunctionPass *Printer = getTarget().createAsmPrinter(Out, *this, Verbose);
if (!Printer)
llvm_report_error("unable to create assembly printer");
PM.add(Printer);
return false;
}
/// addPassesToEmitFileFinish - If the passes to emit the specified file had to
/// be split up (e.g., to add an object writer pass), this method can be used to
/// finish up adding passes to emit the file, if necessary.