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/Store.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Analysis/Store.cpp') diff --git a/lib/Analysis/Store.cpp b/lib/Analysis/Store.cpp index 66b99a85a3..b939a0df9c 100644 --- a/lib/Analysis/Store.cpp +++ b/lib/Analysis/Store.cpp @@ -36,7 +36,7 @@ StoreManager::MakeElementRegion(const GRState *state, const MemRegion *region, } static bool IsCompleteType(ASTContext &Ctx, QualType Ty) { - if (const RecordType *RT = Ty->getAs()) { + if (const RecordType *RT = Ty->getAsRecordType()) { const RecordDecl *D = RT->getDecl(); if (!D->getDefinition(Ctx)) return false; @@ -62,7 +62,7 @@ StoreManager::NewCastRegion(const GRState *state, const MemRegion* R, // Now assume we are casting from pointer to pointer. Other cases should // already be handled. - QualType PointeeTy = CastToTy->getAs()->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 @@ const GRState *StoreManager::InvalidateRegion(const GRState *state, // 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()->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. -- cgit v1.2.3