aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Writer/ConstantWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode/Writer/ConstantWriter.cpp')
-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);