diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-12-17 02:45:41 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-12-17 02:45:41 +0000 |
commit | feb7ba3d9abfa1eb89f6da93c51649baaa931ab8 (patch) | |
tree | e786ddd6df6030635be9f5f8bef6e69cbbd2bf66 /include | |
parent | e509aa961c3f062359ced5d1809a95240124a052 (diff) | |
download | external_llvm-feb7ba3d9abfa1eb89f6da93c51649baaa931ab8.tar.gz external_llvm-feb7ba3d9abfa1eb89f6da93c51649baaa931ab8.tar.bz2 external_llvm-feb7ba3d9abfa1eb89f6da93c51649baaa931ab8.zip |
MC/Assembler: Make the MCObjectWriter available through the lifetime of the
assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 19d8ea5d09..afce14a155 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -648,6 +648,8 @@ private: MCCodeEmitter &Emitter; + MCObjectWriter &Writer; + raw_ostream &OS; iplist<MCSectionData> Sections; @@ -770,8 +772,9 @@ public: // concrete and require clients to pass in a target like object. The other // option is to make this abstract, and have targets provide concrete // implementations as we do with AsmParser. - MCAssembler(MCContext &_Context, TargetAsmBackend &_Backend, - MCCodeEmitter &_Emitter, raw_ostream &OS); + MCAssembler(MCContext &Context_, TargetAsmBackend &Backend_, + MCCodeEmitter &Emitter_, MCObjectWriter &Writer_, + raw_ostream &OS); ~MCAssembler(); MCContext &getContext() const { return Context; } @@ -780,10 +783,12 @@ public: MCCodeEmitter &getEmitter() const { return Emitter; } + MCObjectWriter &getWriter() const { return Writer; } + /// Finish - Do final processing and write the object to the output stream. /// \arg Writer is used for custom object writer (as the MCJIT does), /// if not specified it is automatically created from backend. - void Finish(MCObjectWriter *Writer = 0); + void Finish(); // FIXME: This does not belong here. bool getSubsectionsViaSymbols() const { |