[clang] [CIR] Inheriting Constructor/inheriting ctor inlining lowering (PR #191467)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 10 16:47:12 PDT 2026
================
@@ -1344,14 +1344,134 @@ void CIRGenFunction::emitCXXConstructorCall(const clang::CXXConstructorDecl *d,
assert(!cir::MissingFeatures::opCallArgEvaluationOrder());
- emitCallArgs(args, fpt, e->arguments(), e->getConstructor(),
- /*ParamsToSkip=*/0);
+ if (auto inherited = d->getInheritedConstructor();
+ !inherited || cgm.getTypes().inheritingCtorHasParams(inherited, type))
+ emitCallArgs(args, fpt, e->arguments(), e->getConstructor(),
+ /*ParamsToSkip=*/0);
assert(!cir::MissingFeatures::sanitizers());
emitCXXConstructorCall(d, type, forVirtualBase, delegating, thisAddr, args,
e->getExprLoc());
}
+static bool canEmitDelegateCallArgs(CIRGenModule &cgm, ASTContext &ctx,
+ const CXXConstructorDecl *d,
+ CXXCtorType type) {
+ // We can't forward a variadic call.
+ if (d->isVariadic())
+ return false;
+
+ if (ctx.getTargetInfo().getCXXABI().areArgsDestroyedLeftToRightInCallee()) {
----------------
andykaylor wrote:
I don't understand what right-to-left has to do with this. Shouldn't we be checking `isParamDestroyedInCallee`
https://github.com/llvm/llvm-project/pull/191467
More information about the cfe-commits
mailing list