Remove usage of ConstantPointer
[oota-llvm.git] / lib / Bytecode / Writer / ConstantWriter.cpp
index 303672d166f664511583cdf1f83ffd8280da8b96..5813ea296d82b808d24c6ad9493a6b285aacd572 100644 (file)
@@ -175,9 +175,7 @@ bool BytecodeWriter::outputConstant(const Constant *CPV) {
   }
 
   case Type::PointerTyID: {
-    const ConstantPointer *CPP = cast<ConstantPointer>(CPV);
-    assert(!isa<ConstantPointerNull>(CPP) && "Null should be already emitted!");
-    const ConstantPointerRef *CPR = cast<ConstantPointerRef>(CPP);
+    const ConstantPointerRef *CPR = cast<ConstantPointerRef>(CPV);
     int Slot = Table.getSlot((Value*)CPR->getValue());
     assert(Slot != -1 && "Global used but not available!!");
     output_vbr((unsigned)Slot, Out);