Skip to content

Commit ef57248

Browse files
committed
Address review feedback
1 parent e1decb9 commit ef57248

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CIR/CodeGen/CIRGenDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,9 +840,9 @@ template <class Derived> struct DestroyNRVOVariable : EHScopeStack::Cleanup {
840840

841841
CIRGenBuilderTy &builder = cgf.getBuilder();
842842
mlir::OpBuilder::InsertionGuard guard(builder);
843-
mlir::Location loc = addr.getPointer().getLoc();
844843
if (nrvo) {
845844
// If we exited via NRVO, we skip the destructor call.
845+
mlir::Location loc = addr.getPointer().getLoc();
846846
mlir::Value didNRVO = builder.createFlagLoad(loc, nrvoFlag);
847847
mlir::Value notNRVO = builder.createNot(didNRVO);
848848
cir::IfOp::create(builder, loc, notNRVO, /*withElseRegion=*/false,

0 commit comments

Comments
 (0)