summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-29 17:35:09 +0000
committerChris Lattner <sabre@nondot.org>2002-10-29 17:35:09 +0000
commit353b60a8721f96b8a445974cb0d7df5c2f660ecc (patch)
tree7bc64c4cd0bab96baac75e8d3aa5fe7ee742b298
parentb09c202cbc9454a877deaee9c58d1bd7d9c6f393 (diff)
downloadbcm5719-llvm-353b60a8721f96b8a445974cb0d7df5c2f660ecc.tar.gz
bcm5719-llvm-353b60a8721f96b8a445974cb0d7df5c2f660ecc.zip
Rename opCodeString to Name, add new getName() method
llvm-svn: 4388
-rw-r--r--llvm/include/llvm/Target/MachineInstrInfo.h6
-rw-r--r--llvm/include/llvm/Target/TargetInstrInfo.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/llvm/include/llvm/Target/MachineInstrInfo.h b/llvm/include/llvm/Target/MachineInstrInfo.h
index cd7dc66c79b..4198bedd8fc 100644
--- a/llvm/include/llvm/Target/MachineInstrInfo.h
+++ b/llvm/include/llvm/Target/MachineInstrInfo.h
@@ -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;
diff --git a/llvm/include/llvm/Target/TargetInstrInfo.h b/llvm/include/llvm/Target/TargetInstrInfo.h
index cd7dc66c79b..4198bedd8fc 100644
--- a/llvm/include/llvm/Target/TargetInstrInfo.h
+++ b/llvm/include/llvm/Target/TargetInstrInfo.h
@@ -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;
OpenPOWER on IntegriCloud