[Mlir-commits] [mlir] [mlir][debug] Convert DbgIntrOp to DebugRecords directly. (PR #154926)

Tobias Gysi llvmlistbot at llvm.org
Tue Aug 26 04:20:01 PDT 2025


================
@@ -358,6 +359,16 @@ static void convertModuleFlagsOp(ArrayAttr flags, llvm::IRBuilderBase &builder,
   }
 }
 
+static llvm::DILocalScope *
+getLocalScopeFromLoc(llvm::IRBuilderBase &builder, Location loc,
+                     LLVM::ModuleTranslation &moduleTranslation) {
+  if (auto scopeLoc = loc->findInstanceOf<FusedLocWith<LLVM::DIScopeAttr>>())
+    if (llvm::DILocalScope *localScope = llvm::dyn_cast<llvm::DILocalScope>(
----------------
gysit wrote:

```suggestion
    if (auto *localScope = llvm::dyn_cast<llvm::DILocalScope>(
```
ultra nit: auto would be fine here.

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


More information about the Mlir-commits mailing list