Move MachineInstr::getOpcode inline.
authorOwen Anderson <resistor@mac.com>
Thu, 14 Aug 2008 23:25:30 +0000 (23:25 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 14 Aug 2008 23:25:30 +0000 (23:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54807 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstr.h
lib/CodeGen/MachineInstr.cpp

index bcbcf316d058d1f1a5e68902017e60a47fd1cd56..471cebef63a21b34fe229e4cd15b9f0426f8d049 100644 (file)
@@ -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.
   ///
index d602e2442f7d1bae3d32e7589d92fbeb68c7b084..ccd53fa4c4e694399f38eeeb89119e9ea5d1e6fe 100644 (file)
@@ -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.