X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FBytecode%2FWriter%2FConstantWriter.cpp;h=5813ea296d82b808d24c6ad9493a6b285aacd572;hp=303672d166f664511583cdf1f83ffd8280da8b96;hb=02071d08c1003efce3f32975c6f4a1cf101829cc;hpb=41495a21f9e881a2bea017caad9eed731f8f37e8 diff --git a/lib/Bytecode/Writer/ConstantWriter.cpp b/lib/Bytecode/Writer/ConstantWriter.cpp index 303672d166f..5813ea296d8 100644 --- a/lib/Bytecode/Writer/ConstantWriter.cpp +++ b/lib/Bytecode/Writer/ConstantWriter.cpp @@ -175,9 +175,7 @@ bool BytecodeWriter::outputConstant(const Constant *CPV) { } case Type::PointerTyID: { - const ConstantPointer *CPP = cast(CPV); - assert(!isa(CPP) && "Null should be already emitted!"); - const ConstantPointerRef *CPR = cast(CPP); + const ConstantPointerRef *CPR = cast(CPV); int Slot = Table.getSlot((Value*)CPR->getValue()); assert(Slot != -1 && "Global used but not available!!"); output_vbr((unsigned)Slot, Out);