[clang] [CIR] Lower calls to trivial copy constructor to cir::CopyOp (PR #168281)
Hendrik Hübner via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 24 10:58:30 PST 2025
================
@@ -1085,6 +1086,26 @@ void LoweringPreparePass::lowerArrayCtor(cir::ArrayCtor op) {
true);
}
+void LoweringPreparePass::lowerTrivialCopyCall(cir::CallOp op) {
+ FuncOp funcOp = getCalledFunction(op);
+ if (!funcOp)
+ return;
+
+ std::optional<cir::CtorKind> ctorKind = funcOp.getCxxConstructorKind();
+ if (ctorKind && *ctorKind == cir::CtorKind::Copy &&
+ funcOp.isCxxTrivialMemberFunction()) {
+ llvm::outs() << "success \n";
----------------
HendrikHuebner wrote:
Whoops... yes :sweat_smile:
https://github.com/llvm/llvm-project/pull/168281
More information about the cfe-commits
mailing list