aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-07 07:27:27 +0000
committerChris Lattner <sabre@nondot.org>2008-01-07 07:27:27 +0000
commit749c6f6b5ed301c84aac562e414486549d7b98eb (patch)
tree275f34b73cd0673d5e8fdcfe02cdb6d60c5422c2 /include/llvm/CodeGen/MachineInstr.h
parent682b8aed0779ac0c9a6a13d79ccc1cff3e9730cf (diff)
rename TargetInstrDescriptor -> TargetInstrDesc.
Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 5450e839db..72463f98d8 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -20,7 +20,7 @@
namespace llvm {
-class TargetInstrDescriptor;
+class TargetInstrDesc;
template <typename T> struct ilist_traits;
template <typename T> struct ilist;
@@ -29,7 +29,7 @@ template <typename T> struct ilist;
/// MachineInstr - Representation of each machine instruction.
///
class MachineInstr {
- const TargetInstrDescriptor *TID; // Instruction descriptor.
+ const TargetInstrDesc *TID; // Instruction descriptor.
unsigned short NumImplicitOps; // Number of implicit operands (which
// are determined at construction time).
@@ -54,14 +54,14 @@ public:
/// MachineInstr ctor - This constructor create a MachineInstr and add the
/// implicit operands. It reserves space for number of operands specified by
- /// TargetInstrDescriptor.
- explicit MachineInstr(const TargetInstrDescriptor &TID, bool NoImp = false);
+ /// TargetInstrDesc.
+ explicit MachineInstr(const TargetInstrDesc &TID, bool NoImp = false);
/// MachineInstr ctor - Work exactly the same as the ctor above, except that
/// the MachineInstr is created and added to the end of the specified basic
/// block.
///
- MachineInstr(MachineBasicBlock *MBB, const TargetInstrDescriptor &TID);
+ MachineInstr(MachineBasicBlock *MBB, const TargetInstrDesc &TID);
~MachineInstr();
@@ -70,7 +70,7 @@ public:
/// getDesc - Returns the target instruction descriptor of this
/// MachineInstr.
- const TargetInstrDescriptor *getDesc() const { return TID; }
+ const TargetInstrDesc &getDesc() const { return *TID; }
/// getOpcode - Returns the opcode of this MachineInstr.
///
@@ -166,7 +166,7 @@ public:
/// setInstrDescriptor - Replace the instruction descriptor (thus opcode) of
/// the current instruction with a new one.
///
- void setInstrDescriptor(const TargetInstrDescriptor &tid) { TID = &tid; }
+ void setInstrDescriptor(const TargetInstrDesc &tid) { TID = &tid; }
/// RemoveOperand - Erase an operand from an instruction, leaving it with one
/// fewer operand than it started with.