From 35366a67baa970c287c714c957cf78a4131cf60d Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 17 Jul 2009 17:50:17 +0000 Subject: 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 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 --- lib/Analysis/RegionStore.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/Analysis/RegionStore.cpp') diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index f956ecab7f..0d2467f55e 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -365,7 +365,7 @@ static bool isGenericPtr(ASTContext &Ctx, QualType Ty) { if (Ty->isVoidType()) return true; - if (const PointerType *PT = Ty->getAs()) { + if (const PointerType *PT = Ty->getAsPointerType()) { Ty = PT->getPointeeType(); continue; } @@ -680,7 +680,7 @@ SVal RegionStoreManager::EvalBinOp(const GRState *state, T = Sym->getType(getContext()); } - QualType EleTy = T->getAs()->getPointeeType(); + QualType EleTy = T->getAsPointerType()->getPointeeType(); SVal ZeroIdx = ValMgr.makeZeroArrayIndex(); ER = MRMgr.getElementRegion(EleTy, ZeroIdx, SR, getContext()); break; @@ -689,7 +689,7 @@ SVal RegionStoreManager::EvalBinOp(const GRState *state, // Get the alloca region's current cast type. const AllocaRegion *AR = cast(MR); QualType T = *(state->get(AR)); - QualType EleTy = T->getAs()->getPointeeType(); + QualType EleTy = T->getAsPointerType()->getPointeeType(); SVal ZeroIdx = ValMgr.makeZeroArrayIndex(); ER = MRMgr.getElementRegion(EleTy, ZeroIdx, AR, getContext()); break; @@ -865,7 +865,7 @@ SVal RegionStoreManager::Retrieve(const GRState *state, Loc L, QualType T) { // symbol value. if (const QualType *p = state->get(R)) { QualType T = *p; - RTy = T->getAs()->getPointeeType(); + RTy = T->getAsPointerType()->getPointeeType(); } // All other values are symbolic. @@ -937,7 +937,7 @@ SVal RegionStoreManager::RetrieveElement(const GRState* state, // If the region is already cast to another type, use that type to create the // symbol value. if (const QualType *p = state->get(R)) - Ty = (*p)->getAs()->getPointeeType(); + Ty = (*p)->getAsPointerType()->getPointeeType(); return ValMgr.getRegionValueSymbolValOrUnknown(R, Ty); } @@ -976,7 +976,7 @@ SVal RegionStoreManager::RetrieveField(const GRState* state, // symbol value. if (const QualType *p = state->get(R)) { QualType tmp = *p; - Ty = tmp->getAs()->getPointeeType(); + Ty = tmp->getAsPointerType()->getPointeeType(); } // All other values are symbolic. @@ -1009,7 +1009,7 @@ SVal RegionStoreManager::RetrieveObjCIvar(const GRState* state, // symbol value. if (const QualType *p = state->get(R)) { QualType tmp = *p; - Ty = tmp->getAs()->getPointeeType(); + Ty = tmp->getAsPointerType()->getPointeeType(); } // All other values are symbolic. @@ -1201,7 +1201,7 @@ RegionStoreManager::BindStruct(const GRState *state, const TypedRegion* R, QualType T = R->getValueType(getContext()); assert(T->isStructureType()); - const RecordType* RT = T->getAs(); + const RecordType* RT = T->getAsRecordType(); RecordDecl* RD = RT->getDecl(); if (!RD->isDefinition()) -- cgit v1.2.3