summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
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
commitea2553893672efd26d6138ba1fb762f3b4bd36da (patch)
tree01bad29e670678191a70078a8c540806a3adc4d5 /llvm/lib/Bytecode/Writer/ConstantWriter.cpp
parentc96e96b26dc2f667d60483ed085e22ce0a7bd5df (diff)
downloadbcm5719-llvm-ea2553893672efd26d6138ba1fb762f3b4bd36da.tar.gz
bcm5719-llvm-ea2553893672efd26d6138ba1fb762f3b4bd36da.zip
Remove usage of ConstantPointer
llvm-svn: 10051
Diffstat (limited to 'llvm/lib/Bytecode/Writer/ConstantWriter.cpp')
-rw-r--r--llvm/lib/Bytecode/Writer/ConstantWriter.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
index 303672d166f..5813ea296d8 100644
--- a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud