X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FCodeGen%2FLiveRangeEdit.h;h=def7b00ce761e8b691435514f00c6d148568ba28;hb=3450f800aa65c91f0496816ba6061a422a74c1fe;hp=1831a07a8f3ae3b1e0e829cba9b375d9f3e6a05b;hpb=c696c8bd35a8ab293879e821142dd9136201f16e;p=oota-llvm.git diff --git a/include/llvm/CodeGen/LiveRangeEdit.h b/include/llvm/CodeGen/LiveRangeEdit.h index 1831a07a8f3..def7b00ce76 100644 --- a/include/llvm/CodeGen/LiveRangeEdit.h +++ b/include/llvm/CodeGen/LiveRangeEdit.h @@ -55,7 +55,7 @@ public: }; private: - LiveInterval &Parent; + LiveInterval *Parent; SmallVectorImpl &NewRegs; MachineRegisterInfo &MRI; LiveIntervals &LIS; @@ -99,7 +99,7 @@ public: /// @param vrm Map of virtual registers to physical registers for this /// function. If NULL, no virtual register map updates will /// be done. This could be the case if called before Regalloc. - LiveRangeEdit(LiveInterval &parent, + LiveRangeEdit(LiveInterval *parent, SmallVectorImpl &newRegs, MachineFunction &MF, LiveIntervals &lis, @@ -112,8 +112,11 @@ public: FirstNew(newRegs.size()), ScannedRemattable(false) {} - LiveInterval &getParent() const { return Parent; } - unsigned getReg() const { return Parent.reg; } + LiveInterval &getParent() const { + assert(Parent && "No parent LiveInterval"); + return *Parent; + } + unsigned getReg() const { return getParent().reg; } /// Iterator for accessing the new registers added by this edit. typedef SmallVectorImpl::const_iterator iterator;