summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/CodeGen/MachineInstr.h3
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp6
2 files changed, 2 insertions, 7 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h
index bcbcf316d05..471cebef63a 100644
--- a/llvm/include/llvm/CodeGen/MachineInstr.h
+++ b/llvm/include/llvm/CodeGen/MachineInstr.h
@@ -21,6 +21,7 @@
#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineMemOperand.h"
+#include "llvm/Target/TargetInstrDesc.h"
#include <list>
#include <vector>
@@ -89,7 +90,7 @@ public:
/// getOpcode - Returns the opcode of this MachineInstr.
///
- int getOpcode() const;
+ int getOpcode() const { return TID->Opcode; }
/// Access to explicit operands of the instruction.
///
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index d602e2442f7..ccd53fa4c4e 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -345,12 +345,6 @@ MachineInstr::~MachineInstr() {
#endif
}
-/// getOpcode - Returns the opcode of this MachineInstr.
-///
-int MachineInstr::getOpcode() const {
- return TID->Opcode;
-}
-
/// getRegInfo - If this instruction is embedded into a MachineFunction,
/// return the MachineRegisterInfo object for the current function, otherwise
/// return null.
OpenPOWER on IntegriCloud