From bc8d7f9fd4346cfcc285868be32b74e019a40f01 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 20 Jun 2011 01:23:19 +0000 Subject: Restructure the API in Type based on a conversation with Richard Smith. This makes 'isPointerLikeType' a little less confusing, and pulls the decay check into a separate interface that is much more clear and concrete. Also, just implement these as logical wrappers around other predicates. Having a switch based implementation isn't likely to be necessary. We can try to optimize them later if they show up on a profile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133405 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/Type.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'lib/AST/Type.cpp') diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index b30f8966b6..583cb5d57c 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -288,32 +288,6 @@ bool Type::isDerivedType() const { return false; } } - -/// \brief Tests whether the type behaves like a pointer type. -/// -/// This includes all of the obviously pointer types including block pointers, -/// member pointers, and ObjC Object pointers. It also includes function and -/// array types which behave as pointers due to decay. -/// -/// \returns True for types which act like pointer types. -bool Type::isPointerLikeType() const { - switch (CanonicalType->getTypeClass()) { - case Pointer: - case BlockPointer: - case MemberPointer: - case ConstantArray: - case IncompleteArray: - case VariableArray: - case DependentSizedArray: - case FunctionProto: - case FunctionNoProto: - case ObjCObjectPointer: - return true; - default: - return false; - } -} - bool Type::isClassType() const { if (const RecordType *RT = getAs()) return RT->getDecl()->isClass(); -- cgit v1.2.3-18-g5258