[Mlir-commits] [mlir] [MLIR][DebugInfo] Set debug info format in MLIR->IR translation (PR #95329)

Tobias Gysi llvmlistbot at llvm.org
Wed Jun 12 23:13:29 PDT 2024


================
@@ -31,6 +34,13 @@ void registerToLLVMIRTranslation() {
         if (!llvmModule)
           return failure();
 
+        // When printing LLVM IR, we should convert the module to the debug info
+        // format that LLVM expects us to print.
+        // See https://llvm.org/docs/RemoveDIsDebugInfo.html
+        llvm::ScopedDbgInfoFormatSetter FormatSetter(*llvmModule,
----------------
gysit wrote:

```suggestion
        llvm::ScopedDbgInfoFormatSetter formatSetter(*llvmModule,
```
ultra nit: variables should start with lowercase in mlir.

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


More information about the Mlir-commits mailing list