Shorten; no functionality change.

llvm-svn: 65145
This commit is contained in:
Daniel Dunbar 2009-02-20 19:34:33 +00:00
parent ed2776a85c
commit 27032de34b
1 changed files with 6 additions and 8 deletions

View 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);
}
}