mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
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
This commit is contained in:
@ -38,7 +38,6 @@
|
||||
#include "llvm/MC/SubtargetFeature.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
#include "llvm/Support/Host.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/Support/Signals.h"
|
||||
@ -574,13 +573,11 @@ bool LTOCodeGenerator::compileOptimized(raw_ostream &out, std::string &errMsg) {
|
||||
|
||||
legacy::PassManager codeGenPasses;
|
||||
|
||||
formatted_raw_ostream Out(out);
|
||||
|
||||
// If the bitcode files contain ARC code and were compiled with optimization,
|
||||
// the ObjCARCContractPass must be run, so do it unconditionally here.
|
||||
codeGenPasses.add(createObjCARCContractPass());
|
||||
|
||||
if (TargetMach->addPassesToEmitFile(codeGenPasses, Out,
|
||||
if (TargetMach->addPassesToEmitFile(codeGenPasses, out,
|
||||
TargetMachine::CGFT_ObjectFile)) {
|
||||
errMsg = "target file type not supported";
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user