diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-17 17:28:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-17 17:28:29 +0000 |
commit | 02071d08c1003efce3f32975c6f4a1cf101829cc (patch) | |
tree | 7760265f5048d4ea435157303dd5547e2a53c41c /lib/Bytecode | |
parent | 41495a21f9e881a2bea017caad9eed731f8f37e8 (diff) |
Remove usage of ConstantPointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r-- | lib/Bytecode/Writer/ConstantWriter.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Bytecode/Writer/ConstantWriter.cpp b/lib/Bytecode/Writer/ConstantWriter.cpp index 303672d166..5813ea296d 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<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); |