aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-31 04:56:33 +0000
committerChris Lattner <sabre@nondot.org>2007-12-31 04:56:33 +0000
commitf20c1a497fe3922ac718429d65a5fe396890575e (patch)
treed0b6a54ac22fe125c6bcad9a0bdaf41af2f9fd6a /include/llvm/CodeGen/MachineInstr.h
parent534bcfb270d25d2a29759d19981443fee7260e94 (diff)
properly encapsulate the parent field of MBB and MI with get/set accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index d74440f474..fa372f6e16 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -34,8 +34,8 @@ class MachineInstr {
// are determined at construction time).
std::vector<MachineOperand> Operands; // the operands
- MachineInstr* prev, *next; // links for our intrusive list
- MachineBasicBlock* parent; // pointer to the owning basic block
+ MachineInstr *Prev, *Next; // Links for MBB's intrusive list.
+ MachineBasicBlock *Parent; // Pointer to the owning basic block.
// OperandComplete - Return true if it's illegal to add a new operand
bool OperandsComplete() const;
@@ -45,7 +45,7 @@ class MachineInstr {
// Intrusive list support
friend struct ilist_traits<MachineInstr>;
-
+ void setParent(MachineBasicBlock *P) { Parent = P; }
public:
/// MachineInstr ctor - This constructor creates a dummy MachineInstr with
/// TID NULL and no operands.
@@ -64,8 +64,8 @@ public:
~MachineInstr();
- const MachineBasicBlock* getParent() const { return parent; }
- MachineBasicBlock* getParent() { return parent; }
+ const MachineBasicBlock* getParent() const { return Parent; }
+ MachineBasicBlock* getParent() { return Parent; }
/// getInstrDescriptor - Returns the target instruction descriptor of this
/// MachineInstr.