diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-07-17 17:50:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-07-17 17:50:17 +0000 |
commit | 8a286fbdb9618d6faea3f6a6c6b9efe370c73dc3 (patch) | |
tree | 970bd760cffe9915d5b99b6b1057de4a493cf36e /clang/lib/CodeGen/CGExprScalar.cpp | |
parent | 9691e71a4fff2e4dd7accb1d174bf995aed4f7fa (diff) | |
download | bcm5719-llvm-8a286fbdb9618d6faea3f6a6c6b9efe370c73dc3.tar.gz bcm5719-llvm-8a286fbdb9618d6faea3f6a6c6b9efe370c73dc3.zip |
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.
llvm-svn: 76193
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 8103506c2f4..129b4c7846e 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -679,7 +679,7 @@ Value *ScalarExprEmitter::VisitPrePostIncDec(const UnaryOperator *E, int AmountVal = isInc ? 1 : -1; if (ValTy->isPointerType() && - ValTy->getAs<PointerType>()->isVariableArrayType()) { + ValTy->getAsPointerType()->isVariableArrayType()) { // The amount of the addition/subtraction needs to account for the VLA size CGF.ErrorUnsupported(E, "VLA pointer inc/dec"); } @@ -1020,13 +1020,13 @@ Value *ScalarExprEmitter::EmitAdd(const BinOpInfo &Ops) { } if (Ops.Ty->isPointerType() && - Ops.Ty->getAs<PointerType>()->isVariableArrayType()) { + Ops.Ty->getAsPointerType()->isVariableArrayType()) { // The amount of the addition needs to account for the VLA size CGF.ErrorUnsupported(Ops.E, "VLA pointer addition"); } Value *Ptr, *Idx; Expr *IdxExp; - const PointerType *PT = Ops.E->getLHS()->getType()->getAs<PointerType>(); + const PointerType *PT = Ops.E->getLHS()->getType()->getAsPointerType(); const ObjCObjectPointerType *OPT = Ops.E->getLHS()->getType()->getAsObjCObjectPointerType(); if (PT || OPT) { @@ -1034,7 +1034,7 @@ Value *ScalarExprEmitter::EmitAdd(const BinOpInfo &Ops) { Idx = Ops.RHS; IdxExp = Ops.E->getRHS(); } else { // int + pointer - PT = Ops.E->getRHS()->getType()->getAs<PointerType>(); + PT = Ops.E->getRHS()->getType()->getAsPointerType(); OPT = Ops.E->getRHS()->getType()->getAsObjCObjectPointerType(); assert((PT || OPT) && "Invalid add expr"); Ptr = Ops.RHS; @@ -1091,7 +1091,7 @@ Value *ScalarExprEmitter::EmitSub(const BinOpInfo &Ops) { } if (Ops.E->getLHS()->getType()->isPointerType() && - Ops.E->getLHS()->getType()->getAs<PointerType>()->isVariableArrayType()) { + Ops.E->getLHS()->getType()->getAsPointerType()->isVariableArrayType()) { // The amount of the addition needs to account for the VLA size for // ptr-int // The amount of the division needs to account for the VLA size for |