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/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index f956eca..0d2467f 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -365,7 +365,7 @@
if (Ty->isVoidType())
return true;
- if (const PointerType *PT = Ty->getAs<PointerType>()) {
+ if (const PointerType *PT = Ty->getAsPointerType()) {
Ty = PT->getPointeeType();
continue;
}
@@ -680,7 +680,7 @@
T = Sym->getType(getContext());
}
- QualType EleTy = T->getAs<PointerType>()->getPointeeType();
+ QualType EleTy = T->getAsPointerType()->getPointeeType();
SVal ZeroIdx = ValMgr.makeZeroArrayIndex();
ER = MRMgr.getElementRegion(EleTy, ZeroIdx, SR, getContext());
break;
@@ -689,7 +689,7 @@
// Get the alloca region's current cast type.
const AllocaRegion *AR = cast<AllocaRegion>(MR);
QualType T = *(state->get<RegionCasts>(AR));
- QualType EleTy = T->getAs<PointerType>()->getPointeeType();
+ QualType EleTy = T->getAsPointerType()->getPointeeType();
SVal ZeroIdx = ValMgr.makeZeroArrayIndex();
ER = MRMgr.getElementRegion(EleTy, ZeroIdx, AR, getContext());
break;
@@ -865,7 +865,7 @@
// symbol value.
if (const QualType *p = state->get<RegionCasts>(R)) {
QualType T = *p;
- RTy = T->getAs<PointerType>()->getPointeeType();
+ RTy = T->getAsPointerType()->getPointeeType();
}
// All other values are symbolic.
@@ -937,7 +937,7 @@
// If the region is already cast to another type, use that type to create the
// symbol value.
if (const QualType *p = state->get<RegionCasts>(R))
- Ty = (*p)->getAs<PointerType>()->getPointeeType();
+ Ty = (*p)->getAsPointerType()->getPointeeType();
return ValMgr.getRegionValueSymbolValOrUnknown(R, Ty);
}
@@ -976,7 +976,7 @@
// symbol value.
if (const QualType *p = state->get<RegionCasts>(R)) {
QualType tmp = *p;
- Ty = tmp->getAs<PointerType>()->getPointeeType();
+ Ty = tmp->getAsPointerType()->getPointeeType();
}
// All other values are symbolic.
@@ -1009,7 +1009,7 @@
// symbol value.
if (const QualType *p = state->get<RegionCasts>(R)) {
QualType tmp = *p;
- Ty = tmp->getAs<PointerType>()->getPointeeType();
+ Ty = tmp->getAsPointerType()->getPointeeType();
}
// All other values are symbolic.
@@ -1201,7 +1201,7 @@
QualType T = R->getValueType(getContext());
assert(T->isStructureType());
- const RecordType* RT = T->getAs<RecordType>();
+ const RecordType* RT = T->getAsRecordType();
RecordDecl* RD = RT->getDecl();
if (!RD->isDefinition())