[llvm-commits] [dragonegg] r138732 - in /dragonegg/trunk/src: Convert.cpp Types.cpp

Duncan Sands baldrick at free.fr
Mon Aug 29 07:11:47 PDT 2011


Author: baldrick
Date: Mon Aug 29 09:11:47 2011
New Revision: 138732

URL: http://llvm.org/viewvc/llvm-project?rev=138732&view=rev
Log:
Partially revert commit 138663: output C functions void foo() as
void @foo(...).  Leave the Fortran changes (i.e. not abusing ...)
in place.

Modified:
    dragonegg/trunk/src/Convert.cpp
    dragonegg/trunk/src/Types.cpp

Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=138732&r1=138731&r2=138732&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Mon Aug 29 09:11:47 2011
@@ -8431,8 +8431,7 @@
   // If this is a K&R-style function: with a type that takes no arguments but
   // with arguments none the less, then calculate the LLVM type from the list
   // of arguments.
-  if (flag_functions_from_args || (TYPE_ARG_TYPES(function_type) == 0 &&
-                                   gimple_call_num_args(stmt) > 0)) {
+  if (flag_functions_from_args) {
     tree *FirstArgAddr = gimple_call_num_args(stmt) > 0 ?
       gimple_call_arg_ptr(stmt, 0) : NULL;
     Ty = ConvertArgListToFnType(function_type,

Modified: dragonegg/trunk/src/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Types.cpp?rev=138732&r1=138731&r2=138732&view=diff
==============================================================================
--- dragonegg/trunk/src/Types.cpp (original)
+++ dragonegg/trunk/src/Types.cpp Mon Aug 29 09:11:47 2011
@@ -893,7 +893,7 @@
 
   // Finally, make the function type and result attributes.
   PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
-  return FunctionType::get(RetTy, ArgTypes, stdarg_p(type));
+  return FunctionType::get(RetTy, ArgTypes, Args == 0);
 }
 
 static Type *ConvertPointerTypeRecursive(tree type) {





More information about the llvm-commits mailing list