[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 4 07:11:03 PST 2025


================
@@ -84,6 +138,19 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite(
   SmallVector<mlir::NamedAttribute> attributes;
 
   if (init.has_value()) {
+    auto setupRegionInitializedLLVMGlobalOp = [&]() {
----------------
erichkeane wrote:

I think I'd prefer this get extracted to a function in an anonymous namespace (or a static function).  It does quite a lot of work for a lambda.

https://github.com/llvm/llvm-project/pull/125619


More information about the cfe-commits mailing list