[clang] [CIR] Add pass_object_size hidden parameter support (PR #191482)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 30 14:07:56 PDT 2026
================
@@ -1397,8 +1407,14 @@ void CIRGenFunction::emitCallArgs(
if (!ps)
return;
- assert(!cir::MissingFeatures::opCallImplicitObjectSizeArgs());
- cgm.errorNYI("emit implicit object size for call arg");
+ QualType sizeTy = getContext().getSizeType();
+ assert(emittedArg.getValue() && "We emitted nothing for the arg?");
+ mlir::Value v = evaluateOrEmitBuiltinObjectSize(
+ arg, ps->getType(), cast<cir::IntType>(cgm.sizeTy),
+ emittedArg.getValue(), ps->isDynamic());
+ args.add(RValue::get(v), sizeTy);
+ if (!leftToRight)
----------------
adams381 wrote:
Comment was added in an earlier push — see lines 1459-1461 in the latest revision (commit 55be23ecfa65).
https://github.com/llvm/llvm-project/pull/191482
More information about the cfe-commits
mailing list