diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-15 23:34:19 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-15 23:34:19 +0000 |
commit | d97db682a33d42b3d0016bbc8ce0bc1eb2bbf23b (patch) | |
tree | 8d73c38a42e91ef7953c3a557e8ff52b69d3face /llvm/lib/CodeGen/LLVMTargetMachine.cpp | |
parent | 2b30e8be44bac075b4ed28f044c95a1230b3f24b (diff) | |
download | bcm5719-llvm-d97db682a33d42b3d0016bbc8ce0bc1eb2bbf23b.tar.gz bcm5719-llvm-d97db682a33d42b3d0016bbc8ce0bc1eb2bbf23b.zip |
Lift addAssemblyEmitter into LLVMTargetMachine.
- No functionality change.
llvm-svn: 75859
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 15eac944a0e..6e8b374e48e 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -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. |