diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-02 23:37:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-02 23:37:42 +0000 |
commit | 56591ab218639d8a6e4c756ca37adaf20215c3b6 (patch) | |
tree | e5b0843d0c8a5259a3b6b640c6a43ff8e7ddc440 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 9f34dd305b7d9d54904a28774e93ac8d81b211fc (diff) |
refactor code so that LLVMTargetMachine creates the asmstreamer and
mccontext instead of having AsmPrinter do it. This allows other
types of MCStreamer's to be passed in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 49db51ea0b..fea06badca 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -55,19 +55,14 @@ STATISTIC(EmittedInsts, "Number of machine instrs printed"); char AsmPrinter::ID = 0; AsmPrinter::AsmPrinter(formatted_raw_ostream &o, TargetMachine &tm, - const MCAsmInfo *T, bool VerboseAsm) + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) : MachineFunctionPass(&ID), O(o), TM(tm), MAI(T), TRI(tm.getRegisterInfo()), - - OutContext(*new MCContext()), - // FIXME: Pass instprinter to streamer. - OutStreamer(*createAsmStreamer(OutContext, O, *T, - TM.getTargetData()->isLittleEndian(), - VerboseAsm, 0)), - + OutContext(Ctx), OutStreamer(Streamer), LastMI(0), LastFn(0), Counter(~0U), PrevDLT(NULL) { DW = 0; MMI = 0; - this->VerboseAsm = VerboseAsm; + VerboseAsm = Streamer.isVerboseAsm(); } AsmPrinter::~AsmPrinter() { |