Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 4f1f58f..dea207c 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -188,7 +188,7 @@
   llvm::Constant *EmitStructInitialization(InitListExpr *ILE) {
     const llvm::StructType *SType =
         cast<llvm::StructType>(ConvertType(ILE->getType()));
-    RecordDecl *RD = ILE->getType()->getAsRecordType()->getDecl();
+    RecordDecl *RD = ILE->getType()->getAs<RecordType>()->getDecl();
     std::vector<llvm::Constant*> Elts;
 
     // Initialize the whole structure to zero.
@@ -264,7 +264,7 @@
 #ifndef NDEBUG
       // Make sure that it's really an empty and not a failure of
       // semantic analysis.
-      RecordDecl *RD = ILE->getType()->getAsRecordType()->getDecl();
+      RecordDecl *RD = ILE->getType()->getAs<RecordType>()->getDecl();
       for (RecordDecl::field_iterator Field = RD->field_begin(),
                                    FieldEnd = RD->field_end();
            Field != FieldEnd; ++Field)