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/Analysis/Store.cpp b/lib/Analysis/Store.cpp
index 66b99a8..b939a0d 100644
--- a/lib/Analysis/Store.cpp
+++ b/lib/Analysis/Store.cpp
@@ -36,7 +36,7 @@
}
static bool IsCompleteType(ASTContext &Ctx, QualType Ty) {
- if (const RecordType *RT = Ty->getAs<RecordType>()) {
+ if (const RecordType *RT = Ty->getAsRecordType()) {
const RecordDecl *D = RT->getDecl();
if (!D->getDefinition(Ctx))
return false;
@@ -62,7 +62,7 @@
// Now assume we are casting from pointer to pointer. Other cases should
// already be handled.
- QualType PointeeTy = CastToTy->getAs<PointerType>()->getPointeeType();
+ QualType PointeeTy = CastToTy->getAsPointerType()->getPointeeType();
// Process region cast according to the kind of the region being cast.
switch (R->getKind()) {
@@ -243,7 +243,7 @@
// If the region is cast to another type, use that type.
if (const QualType *CastTy = getCastType(state, R)) {
assert(!(*CastTy)->isObjCObjectPointerType());
- QualType NewT = (*CastTy)->getAs<PointerType>()->getPointeeType();
+ QualType NewT = (*CastTy)->getAsPointerType()->getPointeeType();
// The only exception is if the original region had a location type as its
// value type we always want to treat the region as binding to a location.