From 02071d08c1003efce3f32975c6f4a1cf101829cc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 17 Nov 2003 17:28:29 +0000 Subject: [PATCH] Remove usage of ConstantPointer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10051 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bytecode/Writer/ConstantWriter.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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);