]> granicus.if.org Git - clang/commitdiff
Shorten; no functionality change.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 20 Feb 2009 19:34:33 +0000 (19:34 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 20 Feb 2009 19:34:33 +0000 (19:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65145 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExpr.cpp

index 22a6a2d02ed09f9ba8bd8c71768d8539da8f1b51..ea0fc5546412c89071f8198ffbf7972c16bd2d40 100644 (file)
@@ -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);
     }
   }