diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-11 18:54:57 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-11 18:54:57 +0000 |
commit | da0895d003dff3e9c57ca899fc2a3a2b397edb2e (patch) | |
tree | aec1069a2240ded8fd222d87b675aeef148ed58d /lib/CodeGen/CGBlocks.cpp | |
parent | 8f823d2d3c557326d22699d66e5d367d0f0e44ef (diff) |
Minor refactoring of my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index d705af1b33..d62379e4ef 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -626,8 +626,8 @@ CodeGenFunction::GenerateBlockFunction(const BlockExpr *BExpr, const FunctionType *BlockFunctionType = BExpr->getFunctionType(); QualType ResultType; bool IsVariadic; - if (!isa<FunctionNoProtoType>(BlockFunctionType)) { - const FunctionProtoType *FTy = cast<FunctionProtoType>(BlockFunctionType); + if (const FunctionProtoType *FTy = + dyn_cast<FunctionProtoType>(BlockFunctionType)) { ResultType = FTy->getResultType(); IsVariadic = FTy->isVariadic(); } |