[cfe-commits] r54242 - in /cfe/trunk: lib/CodeGen/CGExpr.cpp test/CodeGen/functions.c

Chris Lattner sabre at nondot.org
Wed Jul 30 21:58:59 PDT 2008


Author: lattner
Date: Wed Jul 30 23:58:58 2008
New Revision: 54242

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

Modified:
    cfe/trunk/lib/CodeGen/CGExpr.cpp
    cfe/trunk/test/CodeGen/functions.c

Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=54242&r1=54241&r2=54242&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Wed Jul 30 23:58:58 2008
@@ -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;
   

Modified: cfe/trunk/test/CodeGen/functions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/functions.c?rev=54242&r1=54241&r2=54242&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/functions.c (original)
+++ cfe/trunk/test/CodeGen/functions.c Wed Jul 30 23:58:58 2008
@@ -1,4 +1,4 @@
-// RUN: clang %s -emit-llvm
+// RUN: clang %s -emit-llvm -o -
 int g();
 
 int foo(int i) {
@@ -9,3 +9,9 @@
 	return g(i);
 }
 
+// rdar://6110827
+typedef void T(void);
+void test3(T f) {
+  f();
+}
+





More information about the cfe-commits mailing list