Rename opCodeString to Name, add new getName() method

llvm-svn: 4388
This commit is contained in:
Chris Lattner 2002-10-29 17:35:09 +00:00
parent b09c202cbc
commit 353b60a872
2 changed files with 10 additions and 2 deletions

View File

@ -67,7 +67,7 @@ const unsigned M_PSEUDO_FLAG = 1 << 14;
struct MachineInstrDescriptor {
const char * opCodeString; // Assembly language mnemonic for the opcode.
const char * Name; // Assembly language mnemonic for the opcode.
int numOperands; // Number of args; -1 if variable #args
int resultPos; // Position of the result; -1 if no result
unsigned maxImmedConst; // Largest +ve constant in IMMMED field or 0.
@ -102,6 +102,10 @@ public:
assert(opCode >= 0 && opCode < (int)descSize);
return desc[opCode];
}
const char *getName(MachineOpCode opCode) const {
return get(opCode).Name;
}
int getNumOperands(MachineOpCode opCode) const {
return get(opCode).numOperands;

View File

@ -67,7 +67,7 @@ const unsigned M_PSEUDO_FLAG = 1 << 14;
struct MachineInstrDescriptor {
const char * opCodeString; // Assembly language mnemonic for the opcode.
const char * Name; // Assembly language mnemonic for the opcode.
int numOperands; // Number of args; -1 if variable #args
int resultPos; // Position of the result; -1 if no result
unsigned maxImmedConst; // Largest +ve constant in IMMMED field or 0.
@ -102,6 +102,10 @@ public:
assert(opCode >= 0 && opCode < (int)descSize);
return desc[opCode];
}
const char *getName(MachineOpCode opCode) const {
return get(opCode).Name;
}
int getNumOperands(MachineOpCode opCode) const {
return get(opCode).numOperands;