diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-04-09 21:06:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-04-09 21:06:08 +0000 |
commit | 427c073035b4c64742f3b784a1b6b6ecb41cd601 (patch) | |
tree | 449fd8b30f79e795ea4e70b220e8c0670cd5c989 /tools/llc | |
parent | 66649e00c91e30fdfc8dd64b43cde2632a831138 (diff) |
Simplify use of formatted_raw_ostream.
formatted_raw_ostream is a wrapper over another stream to add column and line
number tracking.
It is used only for asm printing.
This patch moves the its creation down to where we know we are printing
assembly. This has the following advantages:
* Simpler lifetime management: std::unique_ptr
* We don't compute column and line number of object files :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r-- | tools/llc/llc.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index d46cbb3181b..c20adfd9021 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -335,8 +335,6 @@ static int compileModule(char **argv, LLVMContext &Context) { << ": warning: ignoring -mc-relax-all because filetype != obj"; { - formatted_raw_ostream FOS(Out->os()); - AnalysisID StartAfterID = nullptr; AnalysisID StopAfterID = nullptr; const PassRegistry *PR = PassRegistry::getPassRegistry(); @@ -358,7 +356,7 @@ static int compileModule(char **argv, LLVMContext &Context) { } // Ask the target to add backend passes as necessary. - if (Target->addPassesToEmitFile(PM, FOS, FileType, NoVerify, + if (Target->addPassesToEmitFile(PM, Out->os(), FileType, NoVerify, StartAfterID, StopAfterID)) { errs() << argv[0] << ": target does not support generation of this" << " file type!\n"; |