Add Type::hasPointerRepresentation predicate.
 - For types whose native representation is a pointer.

 - Use to replace ExprConstant.cpp:HasPointerEvalType,
   CodeGenFunction::isObjCPointerType.

llvm-svn: 65569
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 2f09734..81fd387 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -73,17 +73,11 @@
   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();
 }