diff options
author | Chris Lattner <sabre@nondot.org> | 2001-09-10 20:02:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-09-10 20:02:12 +0000 |
commit | 746e0014a6c59f285ffefc30c722ef2cf69eb95d (patch) | |
tree | 5a801c40897a090dd98a3b5c1792f1dec72c7a22 /include/llvm/CodeGen/MachineInstr.h | |
parent | b221a763862ccaed46dee3fbf56c384981d84fbd (diff) |
Update assertion to allow extra case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index b8e7ec5c6a..43dc78dfc5 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -102,7 +102,8 @@ public: return opType; } inline Value* getVRegValue () const { - assert(opType == MO_VirtualRegister || opType == MO_CCRegister); + assert(opType == MO_VirtualRegister || opType == MO_CCRegister || + opType == MO_PCRelativeDisp); return value; } inline unsigned int getMachineRegNum() const { @@ -377,8 +378,8 @@ public: // and inlining it avoids a serious circurality in link order. inline void dropAllReferences() { for (unsigned i=0, N=tempVec.size(); i < N; i++) - if (tempVec[i]->getValueType() == Value::InstructionVal) - ((Instruction*) tempVec[i])->dropAllReferences(); + if (Instruction *I = tempVec[i]->castInstruction()) + I->dropAllReferences(); } }; |