[clang] [CIR] Call to variadic functions (PR #141942)
Sirui Mu via cfe-commits
cfe-commits at lists.llvm.org
Thu May 29 20:57:13 PDT 2025
================
@@ -409,6 +409,18 @@ void CIRGenFunction::emitCallArg(CallArgList &args, const clang::Expr *e,
args.add(emitAnyExprToTemp(e), argType);
}
+QualType CIRGenFunction::getVarArgType(const Expr *arg) {
+ // System headers on Windows define NULL to 0 instead of 0LL on Win64. MSVC
+ // implicitly widens null pointer constants that are arguments to varargs
+ // functions to pointer-sized ints.
+ if (!getTarget().getTriple().isOSWindows())
+ return arg->getType();
+
+ assert(!cir::MissingFeatures::msabi());
+ cgm.errorNYI(arg->getSourceRange(), "getVarArgType: NYI for Windows target");
+ return {};
----------------
Lancern wrote:
Updated.
https://github.com/llvm/llvm-project/pull/141942
More information about the cfe-commits
mailing list