Fix a regression I introduced in r54107:
http://llvm.org/viewvc/llvm-project?view=rev&revision=54107


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54242 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index b219b7a..1fd616c 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -721,7 +721,7 @@
   // The callee type will always be a pointer to function type, get the function
   // type.
   FnType = FnType->getAsPointerType()->getPointeeType();
-  QualType ResultType = cast<FunctionType>(FnType)->getResultType();
+  QualType ResultType = FnType->getAsFunctionType()->getResultType();
 
   llvm::SmallVector<llvm::Value*, 16> Args;