aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h26
-rw-r--r--include/llvm/CodeGen/MachineInstr.h10
2 files changed, 18 insertions, 18 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index eacf067feb..d2b1d5fc2d 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -33,17 +33,17 @@ protected:
public:
ilist_traits<MachineInstr>() : parent(0) { }
- static MachineInstr* getPrev(MachineInstr* N) { return N->prev; }
- static MachineInstr* getNext(MachineInstr* N) { return N->next; }
+ static MachineInstr* getPrev(MachineInstr* N) { return N->Prev; }
+ static MachineInstr* getNext(MachineInstr* N) { return N->Next; }
static const MachineInstr*
- getPrev(const MachineInstr* N) { return N->prev; }
+ getPrev(const MachineInstr* N) { return N->Prev; }
static const MachineInstr*
- getNext(const MachineInstr* N) { return N->next; }
+ getNext(const MachineInstr* N) { return N->Next; }
- static void setPrev(MachineInstr* N, MachineInstr* prev) { N->prev = prev; }
- static void setNext(MachineInstr* N, MachineInstr* next) { N->next = next; }
+ static void setPrev(MachineInstr* N, MachineInstr* prev) { N->Prev = prev; }
+ static void setNext(MachineInstr* N, MachineInstr* next) { N->Next = next; }
static MachineInstr* createSentinel();
static void destroySentinel(MachineInstr *MI) { delete MI; }
@@ -63,7 +63,9 @@ class MachineBasicBlock {
MachineBasicBlock *Prev, *Next;
const BasicBlock *BB;
int Number;
- MachineFunction *Parent;
+ MachineFunction *xParent;
+
+ void setParent(MachineFunction *P) { xParent = P; }
/// Predecessors/Successors - Keep track of the predecessor / successor
/// basicblocks.
@@ -79,10 +81,8 @@ class MachineBasicBlock {
bool IsLandingPad;
public:
- explicit MachineBasicBlock(const BasicBlock *bb = 0) : Prev(0), Next(0),
- BB(bb), Number(-1),
- Parent(0),
- IsLandingPad(false) {
+ explicit MachineBasicBlock(const BasicBlock *bb = 0)
+ : Prev(0), Next(0), BB(bb), Number(-1), xParent(0), IsLandingPad(false) {
Insts.parent = this;
}
@@ -95,8 +95,8 @@ public:
/// getParent - Return the MachineFunction containing this basic block.
///
- const MachineFunction *getParent() const { return Parent; }
- MachineFunction *getParent() { return Parent; }
+ const MachineFunction *getParent() const { return xParent; }
+ MachineFunction *getParent() { return xParent; }
typedef ilist<MachineInstr>::iterator iterator;
typedef ilist<MachineInstr>::const_iterator const_iterator;
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.