Simplify use of formatted_raw_ostream.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 9 Apr 2015 21:06:08 +0000 (21:06 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 9 Apr 2015 21:06:08 +0000 (21:06 +0000)
commit427c073035b4c64742f3b784a1b6b6ecb41cd601
tree449fd8b30f79e795ea4e70b220e8c0670cd5c989
parent66649e00c91e30fdfc8dd64b43cde2632a831138
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
13 files changed:
include/llvm/MC/MCStreamer.h
include/llvm/Support/FormattedStream.h
include/llvm/Support/TargetRegistry.h
include/llvm/Target/TargetMachine.h
lib/CodeGen/LLVMTargetMachine.cpp
lib/LTO/LTOCodeGenerator.cpp
lib/MC/MCAsmStreamer.cpp
lib/Target/CppBackend/CPPBackend.cpp
lib/Target/CppBackend/CPPTargetMachine.h
lib/Target/TargetMachineC.cpp
tools/gold/gold-plugin.cpp
tools/llc/llc.cpp
tools/llvm-mc/llvm-mc.cpp