aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Target/MachineInstrInfo.h6
-rw-r--r--include/llvm/Target/TargetInstrInfo.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/include/llvm/Target/MachineInstrInfo.h b/include/llvm/Target/MachineInstrInfo.h
index cd7dc66..4198bed 100644
--- a/include/llvm/Target/MachineInstrInfo.h
+++ b/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/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index cd7dc66..4198bed 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/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;