aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-17 17:28:29 +0000
committerChris Lattner <sabre@nondot.org>2003-11-17 17:28:29 +0000
commit02071d08c1003efce3f32975c6f4a1cf101829cc (patch)
tree7760265f5048d4ea435157303dd5547e2a53c41c /lib/Bytecode
parent41495a21f9e881a2bea017caad9eed731f8f37e8 (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.cpp4
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);