[llvm-commits] [llvm] r54807 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h lib/CodeGen/MachineInstr.cpp

Owen Anderson resistor at mac.com
Thu Aug 14 16:25:30 PDT 2008


Author: resistor
Date: Thu Aug 14 18:25:30 2008
New Revision: 54807

URL: http://llvm.org/viewvc/llvm-project?rev=54807&view=rev
Log:
Move MachineInstr::getOpcode inline.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineInstr.h
    llvm/trunk/lib/CodeGen/MachineInstr.cpp

Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=54807&r1=54806&r2=54807&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Thu Aug 14 18:25:30 2008
@@ -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 @@
 
   /// getOpcode - Returns the opcode of this MachineInstr.
   ///
-  int getOpcode() const;
+  int getOpcode() const { return TID->Opcode; }
 
   /// Access to explicit operands of the instruction.
   ///

Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=54807&r1=54806&r2=54807&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Thu Aug 14 18:25:30 2008
@@ -345,12 +345,6 @@
 #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.





More information about the llvm-commits mailing list