summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-16 19:58:26 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-16 19:58:26 +0000
commite3fb4b65243972788b91f98b66fe4e911e1d9e90 (patch)
tree15718d8cc74d63fe862e053662c5de8dc46c1584 /clang/lib/CodeGen/CGBlocks.cpp
parentc277dc408bea3697fbaa3429658c4d8deff3f066 (diff)
downloadbcm5719-llvm-e3fb4b65243972788b91f98b66fe4e911e1d9e90.tar.gz
bcm5719-llvm-e3fb4b65243972788b91f98b66fe4e911e1d9e90.zip
Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 73200fe2ca3..d8d1259587b 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -388,7 +388,7 @@ const llvm::Type *BlockModule::getGenericExtendedBlockLiteralType() {
RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E) {
const BlockPointerType *BPT =
- E->getCallee()->getType()->getAsBlockPointerType();
+ E->getCallee()->getType()->getAs<BlockPointerType>();
llvm::Value *Callee = EmitScalarExpr(E->getCallee());
OpenPOWER on IntegriCloud