Change uses of:
  Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
  Type::getAsRecordType() -> Type::getAs<RecordType>()
  Type::getAsPointerType() -> Type::getAs<PointerType>()
  Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
  Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
  Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
  Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
  Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
  Type::getAsTagType() -> Type::getAs<TagType>()
  
And remove Type::getAsReferenceType(), etc.

This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/TargetABIInfo.cpp b/lib/CodeGen/TargetABIInfo.cpp
index 5c8d5dd..938281e 100644
--- a/lib/CodeGen/TargetABIInfo.cpp
+++ b/lib/CodeGen/TargetABIInfo.cpp
@@ -68,7 +68,7 @@
 /// fields. Note that a structure with a flexible array member is not
 /// considered empty.
 static bool isEmptyRecord(ASTContext &Context, QualType T) {
-  const RecordType *RT = T->getAsRecordType();
+  const RecordType *RT = T->getAs<RecordType>();
   if (!RT)
     return 0;
   const RecordDecl *RD = RT->getDecl();
@@ -168,7 +168,7 @@
         Context.getTypeSize(FD->getType()) >= 128)
       return true;
 
-    if (const RecordType* RT = FD->getType()->getAsRecordType())
+    if (const RecordType* RT = FD->getType()->getAs<RecordType>())
       if (typeContainsSSEVector(RT->getDecl(), Context))
         return true;
   }
@@ -272,7 +272,7 @@
     return shouldReturnTypeInRegister(AT->getElementType(), Context);
 
   // Otherwise, it must be a record type.
-  const RecordType *RT = Ty->getAsRecordType();
+  const RecordType *RT = Ty->getAs<RecordType>();
   if (!RT) return false;
 
   // Structure types are passed in register if all fields would be
@@ -385,7 +385,7 @@
                                                      ASTContext &Context) {
   unsigned Align = Context.getTypeAlign(Ty);
   if (Align < 128) return 0;
-  if (const RecordType* RT = Ty->getAsRecordType())
+  if (const RecordType* RT = Ty->getAs<RecordType>())
     if (typeContainsSSEVector(RT->getDecl(), Context))
       return 16;
   return 0;
@@ -704,7 +704,7 @@
     if (Hi == Memory)
       Lo = Memory;
     assert((Hi != SSEUp || Lo == SSE) && "Invalid SSEUp array classification.");
-  } else if (const RecordType *RT = Ty->getAsRecordType()) {
+  } else if (const RecordType *RT = Ty->getAs<RecordType>()) {
     uint64_t Size = Context.getTypeSize(Ty);
 
     // AMD64-ABI 3.2.3p2: Rule 1. If the size of an object is larger