================
@@ -792,14 +792,12 @@ arrangeFreeFunctionLikeCall(CIRGenTypes &cgt, 
CIRGenModule &cgm,
       required = RequiredArgs::getFromProtoWithExtraSlots(proto, 0);
     if (proto->hasExtParameterInfos())
       cgm.errorNYI("call to functions with extra parameter info");
-  } else if (cgm.getTargetCIRGenInfo().isNoProtoCallVariadic(
-                 cast<FunctionNoProtoType>(fnType)))
-    cgm.errorNYI("call to function without a prototype");
+  }
----------------
andykaylor wrote:

This isn't right. The actual code that's needed here should match what's in 
classic codegen, which looks like this:

```
  // If we don't have a prototype at all, but we're supposed to
  // explicitly use the variadic convention for unprototyped calls,
  // treat all of the arguments as required but preserve the nominal
  // possibility of variadics.
  } else if (CGM.getTargetCodeGenInfo().isNoProtoCallVariadic(
                 args, cast<FunctionNoProtoType>(fnType))) {
    required = RequiredArgs(args.size());
  }
```
I'm not sure that's needed for the current bug fix.

https://github.com/llvm/llvm-project/pull/182718
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to