The ConstantPointer class is now gone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2003-11-17 19:47:21 +00:00
parent cb7a1eba45
commit 48babfa60d
2 changed files with 23 additions and 49 deletions

View File

@ -278,7 +278,7 @@ ConstantStruct::ConstantStruct(const StructType *T,
}
ConstantPointerRef::ConstantPointerRef(GlobalValue *GV)
: ConstantPointer(GV->getType()) {
: Constant(GV->getType()) {
Operands.push_back(Use(GV, this));
}
@ -337,8 +337,15 @@ bool ConstantArray::classof(const Constant *CPV) {
bool ConstantStruct::classof(const Constant *CPV) {
return isa<StructType>(CPV->getType()) && !isa<ConstantExpr>(CPV);
}
bool ConstantPointer::classof(const Constant *CPV) {
return (isa<PointerType>(CPV->getType()) && !isa<ConstantExpr>(CPV));
bool ConstantPointerNull::classof(const Constant *CPV) {
return isa<PointerType>(CPV->getType()) && !isa<ConstantExpr>(CPV) &&
CPV->getNumOperands() == 0;
}
bool ConstantPointerRef::classof(const Constant *CPV) {
return isa<PointerType>(CPV->getType()) && !isa<ConstantExpr>(CPV) &&
CPV->getNumOperands() == 1;
}