mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
llvm-mc: Add MCContext to MCAssembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6ce004dc76
commit
a03a368acc
@ -21,6 +21,7 @@
|
||||
namespace llvm {
|
||||
class raw_ostream;
|
||||
class MCAssembler;
|
||||
class MCContext;
|
||||
class MCSection;
|
||||
class MCSectionData;
|
||||
|
||||
@ -559,6 +560,8 @@ private:
|
||||
MCAssembler(const MCAssembler&); // DO NOT IMPLEMENT
|
||||
void operator=(const MCAssembler&); // DO NOT IMPLEMENT
|
||||
|
||||
MCContext &Context;
|
||||
|
||||
raw_ostream &OS;
|
||||
|
||||
iplist<MCSectionData> Sections;
|
||||
@ -584,9 +587,11 @@ 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(raw_ostream &OS);
|
||||
MCAssembler(MCContext &_Context, raw_ostream &OS);
|
||||
~MCAssembler();
|
||||
|
||||
MCContext &getContext() const { return Context; }
|
||||
|
||||
/// Finish - Do final processing and write the object to the output stream.
|
||||
void Finish();
|
||||
|
||||
|
@ -940,9 +940,8 @@ MCSymbolData::MCSymbolData(MCSymbol &_Symbol, MCFragment *_Fragment,
|
||||
|
||||
/* *** */
|
||||
|
||||
MCAssembler::MCAssembler(raw_ostream &_OS)
|
||||
: OS(_OS),
|
||||
SubsectionsViaSymbols(false)
|
||||
MCAssembler::MCAssembler(MCContext &_Context, raw_ostream &_OS)
|
||||
: Context(_Context), OS(_OS), SubsectionsViaSymbols(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ private:
|
||||
|
||||
public:
|
||||
MCMachOStreamer(MCContext &Context, raw_ostream &_OS, MCCodeEmitter *_Emitter)
|
||||
: MCStreamer(Context), Assembler(_OS), Emitter(_Emitter),
|
||||
: MCStreamer(Context), Assembler(Context, _OS), Emitter(_Emitter),
|
||||
CurSectionData(0) {}
|
||||
~MCMachOStreamer() {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user