From 01dff9646173fea0c38df4471f41272557ca831a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sj=C3=B6din?= Date: Wed, 9 Mar 2011 17:33:05 +0000 Subject: Add constructors to MCElfStreamer and MCObjectStreamer to take an extra MCAssembler * argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127343 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCObjectStreamer.h | 3 +++ lib/MC/MCELFStreamer.h | 6 ++++++ lib/MC/MCObjectStreamer.cpp | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/include/llvm/MC/MCObjectStreamer.h b/include/llvm/MC/MCObjectStreamer.h index 833341e..221a684 100644 --- a/include/llvm/MC/MCObjectStreamer.h +++ b/include/llvm/MC/MCObjectStreamer.h @@ -38,6 +38,9 @@ class MCObjectStreamer : public MCStreamer { protected: MCObjectStreamer(MCContext &Context, TargetAsmBackend &TAB, raw_ostream &_OS, MCCodeEmitter *_Emitter); + MCObjectStreamer(MCContext &Context, TargetAsmBackend &TAB, + raw_ostream &_OS, MCCodeEmitter *_Emitter, + MCAssembler *_Assembler); ~MCObjectStreamer(); MCSectionData *getCurrentSectionData() const { diff --git a/lib/MC/MCELFStreamer.h b/lib/MC/MCELFStreamer.h index 091101d..db34d58 100644 --- a/lib/MC/MCELFStreamer.h +++ b/lib/MC/MCELFStreamer.h @@ -29,6 +29,12 @@ public: raw_ostream &OS, MCCodeEmitter *Emitter) : MCObjectStreamer(Context, TAB, OS, Emitter) {} + MCELFStreamer(MCContext &Context, TargetAsmBackend &TAB, + raw_ostream &OS, MCCodeEmitter *Emitter, + MCAssembler *Assembler) + : MCObjectStreamer(Context, TAB, OS, Emitter, Assembler) {} + + ~MCELFStreamer() {} /// @name MCStreamer Interface diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp index e67d9b0..ef22eaa 100644 --- a/lib/MC/MCObjectStreamer.cpp +++ b/lib/MC/MCObjectStreamer.cpp @@ -31,6 +31,13 @@ MCObjectStreamer::MCObjectStreamer(MCContext &Context, TargetAsmBackend &TAB, { } +MCObjectStreamer::MCObjectStreamer(MCContext &Context, TargetAsmBackend &TAB, + raw_ostream &OS, MCCodeEmitter *Emitter_, + MCAssembler *_Assembler) + : MCStreamer(Context), Assembler(_Assembler), CurSectionData(0) +{ +} + MCObjectStreamer::~MCObjectStreamer() { delete &Assembler->getBackend(); delete &Assembler->getEmitter(); -- cgit v1.1