Remove usage of ConstantPointer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10051 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-11-17 17:28:29 +00:00
parent 41495a21f9
commit 02071d08c1

View File

@ -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);