mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
llvm-mc: Tweak MCCodeEmitter skeleton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80193 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -26,7 +26,7 @@ public:
|
||||
|
||||
/// EncodeInstruction - Encode the given \arg Inst to bytes on the output
|
||||
/// stream \arg OS.
|
||||
virtual void EncodeInstruction(const MCInst &Inst, raw_ostream &OS) = 0;
|
||||
virtual void EncodeInstruction(const MCInst &Inst, raw_ostream &OS) const = 0;
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
@@ -59,8 +59,7 @@ namespace llvm {
|
||||
typedef TargetAsmParser *(*AsmParserCtorTy)(const Target &T,
|
||||
MCAsmParser &P);
|
||||
typedef MCCodeEmitter *(*CodeEmitterCtorTy)(const Target &T,
|
||||
TargetMachine &TM,
|
||||
const MCAsmInfo &MAI);
|
||||
TargetMachine &TM);
|
||||
|
||||
private:
|
||||
/// Next - The next registered target in the linked list, maintained by the
|
||||
@@ -180,11 +179,10 @@ namespace llvm {
|
||||
}
|
||||
|
||||
/// createCodeEmitter - Create a target specific code emitter.
|
||||
MCCodeEmitter *createCodeEmitter(TargetMachine &TM,
|
||||
const MCAsmInfo *MAI) const {
|
||||
MCCodeEmitter *createCodeEmitter(TargetMachine &TM) const {
|
||||
if (!CodeEmitterCtorFn)
|
||||
return 0;
|
||||
return CodeEmitterCtorFn(*this, TM, *MAI);
|
||||
return CodeEmitterCtorFn(*this, TM);
|
||||
}
|
||||
|
||||
/// @}
|
||||
@@ -493,9 +491,8 @@ namespace llvm {
|
||||
}
|
||||
|
||||
private:
|
||||
static MCCodeEmitter *Allocator(const Target &T, TargetMachine &TM,
|
||||
const MCAsmInfo &MAI) {
|
||||
return new CodeEmitterImpl(T, TM, MAI);
|
||||
static MCCodeEmitter *Allocator(const Target &T, TargetMachine &TM) {
|
||||
return new CodeEmitterImpl(T, TM);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user