summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-09-21 23:43:11 +0000
committerJohn McCall <rjmccall@apple.com>2009-09-21 23:43:11 +0000
commit9dd450bb781484ca4b870529f89842541045c153 (patch)
treeb2033fb4eef5442d9d080df4ae39137b696dcd4e /clang/lib/AST/Expr.cpp
parentfd68c7bdc0ea3a61b90380eab3db89230c6b5f27 (diff)
downloadbcm5719-llvm-9dd450bb781484ca4b870529f89842541045c153.tar.gz
bcm5719-llvm-9dd450bb781484ca4b870529f89842541045c153.zip
Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 60458b4fb6e..6e46c4f701a 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -51,7 +51,7 @@ std::string PredefinedExpr::ComputeName(ASTContext &Context, IdentType IT,
std::string Proto = FD->getQualifiedNameAsString(Policy);
- const FunctionType *AFT = FD->getType()->getAsFunctionType();
+ const FunctionType *AFT = FD->getType()->getAs<FunctionType>();
const FunctionProtoType *FT = 0;
if (FD->hasWrittenPrototype())
FT = dyn_cast<FunctionProtoType>(AFT);
@@ -335,7 +335,7 @@ QualType CallExpr::getCallReturnType() const {
else if (const BlockPointerType *BPT = CalleeType->getAs<BlockPointerType>())
CalleeType = BPT->getPointeeType();
- const FunctionType *FnType = CalleeType->getAsFunctionType();
+ const FunctionType *FnType = CalleeType->getAs<FunctionType>();
return FnType->getResultType();
}
@@ -575,7 +575,7 @@ Expr *InitListExpr::updateInit(unsigned Init, Expr *expr) {
///
const FunctionType *BlockExpr::getFunctionType() const {
return getType()->getAs<BlockPointerType>()->
- getPointeeType()->getAsFunctionType();
+ getPointeeType()->getAs<FunctionType>();
}
SourceLocation BlockExpr::getCaretLocation() const {
@@ -1693,7 +1693,7 @@ bool ExtVectorElementExpr::isArrow() const {
}
unsigned ExtVectorElementExpr::getNumElements() const {
- if (const VectorType *VT = getType()->getAsVectorType())
+ if (const VectorType *VT = getType()->getAs<VectorType>())
return VT->getNumElements();
return 1;
}
OpenPOWER on IntegriCloud