aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-06 16:15:30 +0000
committerChris Lattner <sabre@nondot.org>2002-05-06 16:15:30 +0000
commit9b625030c8427a3bc56f5993c0b5b214c393042f (patch)
tree40bf688c425d93346f3f3a1119f4a9049682724e /lib/AsmParser
parentd44023ecb7a699e52f119bec0eb86830989ff35a (diff)
downloadexternal_llvm-9b625030c8427a3bc56f5993c0b5b214c393042f.zip
external_llvm-9b625030c8427a3bc56f5993c0b5b214c393042f.tar.gz
external_llvm-9b625030c8427a3bc56f5993c0b5b214c393042f.tar.bz2
Replace all usages of Type::isPointerType with isa<PointerType>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2486 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/llvmAsmParser.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index f2eccf5..4faf70c 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -321,7 +321,7 @@ static Value *getValNonImprovising(const Type *Ty, const ValID &D) {
return ConstantFP::get(Ty, D.ConstPoolFP);
case ValID::ConstNullVal: // Is it a null value?
- if (!Ty->isPointerType())
+ if (!isa<PointerType>(Ty))
ThrowException("Cannot create a a non pointer null!");
return ConstantPointerNull::get(cast<PointerType>(Ty));
@@ -1549,14 +1549,14 @@ MemoryInst : MALLOC Types {
delete $2;
}
| FREE ResolvedVal {
- if (!$2->getType()->isPointerType())
+ if (!isa<PointerType>($2->getType()))
ThrowException("Trying to free nonpointer type " +
$2->getType()->getDescription() + "!");
$$ = new FreeInst($2);
}
| LOAD Types ValueRef IndexList {
- if (!(*$2)->isPointerType())
+ if (!isa<PointerType>(*$2))
ThrowException("Can't load from nonpointer type: " +
(*$2)->getDescription());
if (LoadInst::getIndexedType(*$2, *$4) == 0)
@@ -1567,7 +1567,7 @@ MemoryInst : MALLOC Types {
delete $2;
}
| STORE ResolvedVal ',' Types ValueRef IndexList {
- if (!(*$4)->isPointerType())
+ if (!isa<PointerType>(*$4))
ThrowException("Can't store to a nonpointer type: " +
(*$4)->getDescription());
const Type *ElTy = StoreInst::getIndexedType(*$4, *$6);
@@ -1580,7 +1580,7 @@ MemoryInst : MALLOC Types {
delete $4; delete $6;
}
| GETELEMENTPTR Types ValueRef IndexList {
- if (!(*$2)->isPointerType())
+ if (!isa<PointerType>(*$2))
ThrowException("getelementptr insn requires pointer operand!");
if (!GetElementPtrInst::getIndexedType(*$2, *$4, true))
ThrowException("Can't get element ptr '" + (*$2)->getDescription()+ "'!");