diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-26 20:52:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-26 20:52:22 +0000 |
commit | 76ba41ce4fa0f614d8f56f8c3b1c13a2c74c1d85 (patch) | |
tree | 4fddd937d03dbb09cdb48159291e2c434743cd12 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 8b09ad17f90dad6e7873bc8e45b42f30c724eb1a (diff) | |
download | bcm5719-llvm-76ba41ce4fa0f614d8f56f8c3b1c13a2c74c1d85.tar.gz bcm5719-llvm-76ba41ce4fa0f614d8f56f8c3b1c13a2c74c1d85.zip |
Add Type::hasPointerRepresentation predicate.
- For types whose native representation is a pointer.
- Use to replace ExprConstant.cpp:HasPointerEvalType,
CodeGenFunction::isObjCPointerType.
llvm-svn: 65569
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 2f097346665..81fd3871d61 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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(); } |