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 | 5d77cad60bd82dfa2d00f78e26443d667922efbf (patch) | |
tree | 0e6f8a7fd01620ae49b3de9719162d9a6d4ef6f8 /lib/CodeGen/LLVMTargetMachine.cpp | |
parent | e017fd1b20ddc2491974a5c07f1538f89d91ce43 (diff) |
Lift addAssemblyEmitter into LLVMTargetMachine.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 15eac944a0..6e8b374e48 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/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. |