Skip to content

Commit d9b55b7

Browse files
authored
[CIR] Fix extra ; warning, and replace new with emplaceBlock (NFC) (llvm#127207)
1 parent 50b1763 commit d9b55b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ void CIRToLLVMGlobalOpLowering::setupRegionInitializedLLVMGlobalOp(
157157
op, llvmType, isConst, linkage, symbol, nullptr, alignment, addrSpace,
158158
isDsoLocal, isThreadLocal,
159159
/*comdat=*/mlir::SymbolRefAttr(), attributes);
160-
newGlobalOp.getRegion().push_back(new mlir::Block());
160+
newGlobalOp.getRegion().emplaceBlock();
161161
rewriter.setInsertionPointToEnd(newGlobalOp.getInitializerBlock());
162-
};
162+
}
163163

164164
mlir::LogicalResult
165165
CIRToLLVMGlobalOpLowering::matchAndRewriteRegionInitializedGlobal(

0 commit comments

Comments
 (0)