diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-20 19:34:33 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-20 19:34:33 +0000 |
commit | 27032de34b0d57f00f0ade9f83b51fa0461a6471 (patch) | |
tree | ff3a892b7080e859a327947ecde39e1d65e3d931 /clang/lib | |
parent | ed2776a85cbc2a0b71bd4cdc55606c753b7e9cb1 (diff) | |
download | bcm5719-llvm-27032de34b0d57f00f0ade9f83b51fa0461a6471.tar.gz bcm5719-llvm-27032de34b0d57f00f0ade9f83b51fa0461a6471.zip |
Shorten; no functionality change.
llvm-svn: 65145
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 22a6a2d02ed..ea0fc554641 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -971,14 +971,12 @@ RValue CodeGenFunction::EmitCallExpr(const CallExpr *E) { return EmitBlockCallExpr(E); const Decl *TargetDecl = 0; - if (const ImplicitCastExpr *IcExpr = - dyn_cast<ImplicitCastExpr>(E->getCallee())) { - if (const DeclRefExpr *DRExpr = - dyn_cast<DeclRefExpr>(IcExpr->getSubExpr())) { - TargetDecl = DRExpr->getDecl(); - if (const FunctionDecl *FDecl = dyn_cast<FunctionDecl>(TargetDecl)) - if (unsigned builtinID = FDecl->getBuiltinID(getContext())) - return EmitBuiltinExpr(FDecl, builtinID, E); + if (const ImplicitCastExpr *CE = dyn_cast<ImplicitCastExpr>(E->getCallee())) { + if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CE->getSubExpr())) { + TargetDecl = DRE->getDecl(); + if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(TargetDecl)) + if (unsigned builtinID = FD->getBuiltinID(getContext())) + return EmitBuiltinExpr(FD, builtinID, E); } } |