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:
Daniel Dunbar
2009-08-27 01:34:22 +00:00
parent 5b78d50cad
commit 04baf9094a
4 changed files with 25 additions and 10 deletions

View File

@@ -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

View File

@@ -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);
}
};