Update assertion to allow extra case
authorChris Lattner <sabre@nondot.org>
Mon, 10 Sep 2001 20:02:12 +0000 (20:02 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 10 Sep 2001 20:02:12 +0000 (20:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@532 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstr.h

index b8e7ec5c6af5a90402f2325d881cb13813e5e1e6..43dc78dfc55847ce097d37df73d27d974cd0b5aa 100644 (file)
@@ -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();
   }
 };