From: Anders Carlsson Date: Tue, 7 Apr 2009 18:53:02 +0000 (+0000) Subject: Remove some dead code. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ac67a7725ef25f5df8a992277182f51316500e6;p=clang Remove some dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68532 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index e62bf2f3fc..9067787f32 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1204,15 +1204,11 @@ RValue CodeGenFunction::EmitCallExpr(llvm::Value *Callee, QualType CalleeType, const Decl *TargetDecl) { // Get the actual function type. The callee type will always be a // pointer to function type or a block pointer type. - QualType ResultType; - if (const BlockPointerType *BPT = dyn_cast(CalleeType)) { - ResultType = BPT->getPointeeType()->getAsFunctionType()->getResultType(); - } else { - assert(CalleeType->isFunctionPointerType() && - "Call must have function pointer type!"); - QualType FnType = CalleeType->getAsPointerType()->getPointeeType(); - ResultType = FnType->getAsFunctionType()->getResultType(); - } + assert(CalleeType->isFunctionPointerType() && + "Call must have function pointer type!"); + + QualType FnType = CalleeType->getAsPointerType()->getPointeeType(); + QualType ResultType = FnType->getAsFunctionType()->getResultType(); CallArgList Args; for (CallExpr::const_arg_iterator I = ArgBeg; I != ArgEnd; ++I)