aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetData.cpp
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/Target/TargetData.cpp
parentd44023ecb7a699e52f119bec0eb86830989ff35a (diff)
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/Target/TargetData.cpp')
-rw-r--r--lib/Target/TargetData.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 8479c6c8db..0df95209b5 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -61,10 +61,10 @@ Annotation *TargetData::TypeAnFactory(AnnotationID AID, const Annotable *T,
void *D) {
const TargetData &TD = *(const TargetData*)D;
assert(AID == TD.AID && "Target data annotation ID mismatch!");
- const Type *Ty = cast<const Type>((const Value *)T);
- assert(Ty->isStructType() &&
+ const Type *Ty = cast<Type>((const Value *)T);
+ assert(isa<StructType>(Ty) &&
"Can only create StructLayout annotation on structs!");
- return new StructLayout((const StructType *)Ty, TD);
+ return new StructLayout(cast<StructType>(Ty), TD);
}
//===----------------------------------------------------------------------===//