[cfe-commits] r103932 - in /cfe/trunk: lib/Sema/SemaExpr.cpp test/CodeGen/stdcall-fastcall.c
Eli Friedman
eli.friedman at gmail.com
Sun May 16 19:50:19 PDT 2010
Author: efriedma
Date: Sun May 16 21:50:18 2010
New Revision: 103932
URL: http://llvm.org/viewvc/llvm-project?rev=103932&view=rev
Log:
PR7117: Make sure we don't lose the calling convention for K&R-style
definitions.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/test/CodeGen/stdcall-fastcall.c
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=103932&r1=103931&r2=103932&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sun May 16 21:50:18 2010
@@ -1176,7 +1176,8 @@
QualType T = Func->getType();
QualType NoProtoType = T;
if (const FunctionProtoType *Proto = T->getAs<FunctionProtoType>())
- NoProtoType = Context.getFunctionNoProtoType(Proto->getResultType());
+ NoProtoType = Context.getFunctionNoProtoType(Proto->getResultType(),
+ Proto->getExtInfo());
return BuildDeclRefExpr(Func, NoProtoType, NameLoc, &SS);
}
}
Modified: cfe/trunk/test/CodeGen/stdcall-fastcall.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/stdcall-fastcall.c?rev=103932&r1=103931&r2=103932&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/stdcall-fastcall.c (original)
+++ cfe/trunk/test/CodeGen/stdcall-fastcall.c Sun May 16 21:50:18 2010
@@ -31,3 +31,9 @@
return 0;
}
+// PR7117
+void __attribute((stdcall)) f5(foo) int foo; {}
+void f6(void) {
+ f5(0);
+ // CHECK: call x86_stdcallcc void (...)* bitcast
+}
More information about the cfe-commits
mailing list