Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index d011303..2c29347 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -222,7 +222,7 @@
   if (E->isArrow()) {
     if (!EvaluatePointer(E->getBase(), result, Info))
       return APValue();
-    Ty = E->getBase()->getType()->getAs<PointerType>()->getPointeeType();
+    Ty = E->getBase()->getType()->getAsPointerType()->getPointeeType();
   } else {
     result = Visit(E->getBase());
     if (result.isUninit())
@@ -230,7 +230,7 @@
     Ty = E->getBase()->getType();
   }
 
-  RecordDecl *RD = Ty->getAs<RecordType>()->getDecl();
+  RecordDecl *RD = Ty->getAsRecordType()->getDecl();
   const ASTRecordLayout &RL = Info.Ctx.getASTRecordLayout(RD);
 
   FieldDecl *FD = dyn_cast<FieldDecl>(E->getMemberDecl());
@@ -351,7 +351,7 @@
   if (!EvaluateInteger(IExp, AdditionalOffset, Info))
     return APValue();
 
-  QualType PointeeType = PExp->getType()->getAs<PointerType>()->getPointeeType();
+  QualType PointeeType = PExp->getType()->getAsPointerType()->getPointeeType();
   uint64_t SizeOfPointee;
   
   // Explicitly handle GNU void* and function pointer arithmetic extensions.
@@ -1029,7 +1029,7 @@
 
       if (E->getOpcode() == BinaryOperator::Sub) {
         const QualType Type = E->getLHS()->getType();
-        const QualType ElementType = Type->getAs<PointerType>()->getPointeeType();
+        const QualType ElementType = Type->getAsPointerType()->getPointeeType();
 
         uint64_t D = LHSValue.getLValueOffset() - RHSValue.getLValueOffset();
         if (!ElementType->isVoidType() && !ElementType->isFunctionType())