================
@@ -835,7 +835,24 @@ template <class Derived> struct DestroyNRVOVariable :
EHScopeStack::Cleanup {
QualType ty;
void emit(CIRGenFunction &cgf, Flags flags) override {
- assert(!cir::MissingFeatures::cleanupDestroyNRVOVariable());
+ // Along the exceptions path we always execute the dtor.
+ bool nrvo = flags.isForNormalCleanup() && nrvoFlag;
+
+ CIRGenBuilderTy &builder = cgf.getBuilder();
+ mlir::OpBuilder::InsertionGuard guard(builder);
+ mlir::Location loc = addr.getPointer().getLoc();
----------------
AmrDeveloper wrote:
If `loc` will be used only inside the if block, should we move it inside it 🤔
https://github.com/llvm/llvm-project/pull/170774
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits