the tblgen produced 'getRegisterName' method does not access

the object, make it static instead of const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-09-13 20:19:22 +00:00
parent c510f4cb6e
commit d95148f073
14 changed files with 14 additions and 15 deletions

View File

@ -146,7 +146,7 @@ namespace {
void PrintGlobalVariable(const GlobalVariable* GVar);
void printInstruction(const MachineInstr *MI); // autogenerated.
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
void printMachineInstruction(const MachineInstr *MI);
bool runOnMachineFunction(MachineFunction &F);

View File

@ -49,7 +49,7 @@ namespace {
return "Alpha Assembly Printer";
}
void printInstruction(const MachineInstr *MI);
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
void printOp(const MachineOperand &MO, bool IsCallOp = false);
void printOperand(const MachineInstr *MI, int opNum);

View File

@ -51,7 +51,7 @@ namespace {
void printOperand(const MachineInstr *MI, int opNum);
void printMemoryOperand(const MachineInstr *MI, int opNum);
void printInstruction(const MachineInstr *MI); // autogenerated.
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
void emitLinkage(const std::string &n, GlobalValue::LinkageTypes l);
bool runOnMachineFunction(MachineFunction &F);

View File

@ -68,7 +68,7 @@ namespace {
/// printInstruction - This method is automatically generated by tablegen
/// from the instruction set description.
void printInstruction(const MachineInstr *MI);
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
void printMachineInstruction(const MachineInstr *MI);

View File

@ -58,7 +58,7 @@ namespace {
const char* Modifier = 0);
void printCCOperand(const MachineInstr *MI, int OpNum);
void printInstruction(const MachineInstr *MI); // autogenerated.
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
void printMachineInstruction(const MachineInstr * MI);
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,

View File

@ -82,7 +82,7 @@ namespace {
void emitFrameDirective(MachineFunction &MF);
void printInstruction(const MachineInstr *MI); // autogenerated.
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
bool runOnMachineFunction(MachineFunction &F);
bool doInitialization(Module &M);

View File

@ -45,7 +45,7 @@ namespace llvm {
void printOperand(const MachineInstr *MI, int opNum);
void printCCOperand(const MachineInstr *MI, int opNum);
void printInstruction(const MachineInstr *MI); // definition autogenerated.
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
bool printMachineInstruction(const MachineInstr *MI);
void EmitFunctionDecls (Module &M);

View File

@ -120,7 +120,7 @@ namespace {
/// machine instruction was sufficiently described to print it, otherwise it
/// returns false.
void printInstruction(const MachineInstr *MI);
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
void printMachineInstruction(const MachineInstr *MI);

View File

@ -68,7 +68,7 @@ namespace {
void printCCOperand(const MachineInstr *MI, int opNum);
void printInstruction(const MachineInstr *MI); // autogenerated.
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
bool runOnMachineFunction(MachineFunction &F);
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,

View File

@ -67,7 +67,7 @@ namespace {
}
void printInstruction(const MachineInstr *MI); // autogenerated.
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
void printMachineInstruction(const MachineInstr * MI);

View File

@ -19,7 +19,6 @@ namespace llvm {
class MCInst;
class MCOperand;
class raw_ostream;
class TargetRegisterInfo; // FIXME: ELIM
class X86ATTInstPrinter {
raw_ostream &O;
@ -29,7 +28,7 @@ public:
// Autogenerated by tblgen.
void printInstruction(const MCInst *MI);
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
void printOperand(const MCInst *MI, unsigned OpNo,

View File

@ -38,7 +38,7 @@ struct VISIBILITY_HIDDEN X86IntelAsmPrinter : public AsmPrinter {
/// machine instruction was sufficiently described to print it, otherwise it
/// returns false.
void printInstruction(const MachineInstr *MI);
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
// This method is used by the tablegen'erated instruction printer.

View File

@ -80,7 +80,7 @@ namespace {
void emitFunctionEnd(MachineFunction &MF);
void printInstruction(const MachineInstr *MI); // autogenerated.
const char *getRegisterName(unsigned RegNo) const;
static const char *getRegisterName(unsigned RegNo);
void printMachineInstruction(const MachineInstr *MI);
bool runOnMachineFunction(MachineFunction &F);

View File

@ -804,7 +804,7 @@ void AsmWriterEmitter::EmitGetRegisterName(raw_ostream &O) {
"/// from the register set description. This returns the assembler name\n"
"/// for the specified register.\n"
"const char *" << Target.getName() << ClassName
<< "::getRegisterName(unsigned RegNo) const {\n"
<< "::getRegisterName(unsigned RegNo) {\n"
<< " assert(RegNo && RegNo < " << (Registers.size()+1)
<< " && \"Invalid register number!\");\n"
<< "\n"