From 8958891f5fa1e593c4519a36b3df427ee019d70b Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 26 Feb 2009 20:52:22 +0000 Subject: Add Type::hasPointerRepresentation predicate. - For types whose native representation is a pointer. - Use to replace ExprConstant.cpp:HasPointerEvalType, CodeGenFunction::isObjCPointerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65569 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 2f09734666..81fd3871d6 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -73,17 +73,11 @@ const llvm::Type *CodeGenFunction::ConvertType(QualType T) { return CGM.getTypes().ConvertType(T); } -bool CodeGenFunction::isObjCPointerType(QualType T) { - // All Objective-C types are pointers. - return T->isObjCInterfaceType() || - T->isObjCQualifiedInterfaceType() || T->isObjCQualifiedIdType(); -} - bool CodeGenFunction::hasAggregateLLVMType(QualType T) { // FIXME: Use positive checks instead of negative ones to be more // robust in the face of extension. - return !isObjCPointerType(T) &&!T->isRealType() && !T->isPointerType() && - !T->isReferenceType() && !T->isVoidType() && !T->isVectorType() && !T->isFunctionType() && + return !T->hasPointerRepresentation() &&!T->isRealType() && + !T->isVoidType() && !T->isVectorType() && !T->isFunctionType() && !T->isBlockPointerType(); } -- cgit v1.2.3