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
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index e560bfd..7a98b0c 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -525,9 +525,7 @@
} else if (const EnumType *ET = Ty->getAsEnumType()) {
// Classify the underlying integer type.
classify(ET->getDecl()->getIntegerType(), Context, OffsetBase, Lo, Hi);
- } else if (Ty->isPointerType() || Ty->isReferenceType() ||
- Ty->isBlockPointerType() || Ty->isObjCQualifiedIdType() ||
- Ty->isObjCQualifiedInterfaceType()) {
+ } else if (Ty->hasPointerRepresentation()) {
Current = Integer;
} else if (const VectorType *VT = Ty->getAsVectorType()) {
uint64_t Size = Context.getTypeSize(VT);