summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-04-09 02:28:12 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-04-09 02:28:12 +0000
commit132381f9811190993b389e5171d30a1e2cd07f61 (patch)
tree5b314164eafbcd5c0dd64915559a183107d3f6e4 /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parent0a261a3dda4e3198ff9e23f27fe50f3d34fe1c8b (diff)
downloadbcm5719-llvm-132381f9811190993b389e5171d30a1e2cd07f61.tar.gz
bcm5719-llvm-132381f9811190993b389e5171d30a1e2cd07f61.zip
Use the cast machinery to remove dummy uses of formatted_raw_ostream.
If we know we are producing an object, we don't need to wrap the stream in a formatted_raw_ostream anymore. llvm-svn: 234461
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 30148446195..4574dcfe9ef 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -140,12 +140,9 @@ static MCContext *addPassesToGenerateCode(LLVMTargetMachine *TM,
return &MMI->getContext();
}
-bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
- formatted_raw_ostream &Out,
- CodeGenFileType FileType,
- bool DisableVerify,
- AnalysisID StartAfter,
- AnalysisID StopAfter) {
+bool LLVMTargetMachine::addPassesToEmitFile(
+ PassManagerBase &PM, raw_ostream &Out, CodeGenFileType FileType,
+ bool DisableVerify, AnalysisID StartAfter, AnalysisID StopAfter) {
// Add common CodeGen passes.
MCContext *Context = addPassesToGenerateCode(this, PM, DisableVerify,
StartAfter, StopAfter);
@@ -185,9 +182,9 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(),
TargetCPU);
MCStreamer *S = getTarget().createAsmStreamer(
- *Context, Out, Options.MCOptions.AsmVerbose,
- Options.MCOptions.MCUseDwarfDirectory, InstPrinter, MCE, MAB,
- Options.MCOptions.ShowMCInst);
+ *Context, cast<formatted_raw_ostream>(Out),
+ Options.MCOptions.AsmVerbose, Options.MCOptions.MCUseDwarfDirectory,
+ InstPrinter, MCE, MAB, Options.MCOptions.ShowMCInst);
AsmStreamer.reset(S);
break;
}
OpenPOWER on IntegriCloud