From dd7b89788c9d8a7484fd9f5c7443d4a2e3f0f826 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 20 Feb 2009 19:34:33 +0000 Subject: [PATCH] Shorten; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65145 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 22a6a2d02e..ea0fc55464 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/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(E->getCallee())) { - if (const DeclRefExpr *DRExpr = - dyn_cast(IcExpr->getSubExpr())) { - TargetDecl = DRExpr->getDecl(); - if (const FunctionDecl *FDecl = dyn_cast(TargetDecl)) - if (unsigned builtinID = FDecl->getBuiltinID(getContext())) - return EmitBuiltinExpr(FDecl, builtinID, E); + if (const ImplicitCastExpr *CE = dyn_cast(E->getCallee())) { + if (const DeclRefExpr *DRE = dyn_cast(CE->getSubExpr())) { + TargetDecl = DRE->getDecl(); + if (const FunctionDecl *FD = dyn_cast(TargetDecl)) + if (unsigned builtinID = FD->getBuiltinID(getContext())) + return EmitBuiltinExpr(FD, builtinID, E); } } -- 2.40.0