[Mlir-commits] [flang] [mlir] [MLIR][LLVM] Enable export of DISubprograms on function declarations (PR #78026)
Tobias Gysi
llvmlistbot at llvm.org
Sat Jan 13 04:30:12 PST 2024
================
@@ -169,6 +169,20 @@ llvm.func @empty_types() {
// -----
+#di_file = #llvm.di_file<"foo.mlir" in "/test/">
+#di_subprogram = #llvm.di_subprogram<
+ scope = #di_file, name = "func_decl_with_subprogram", file = #di_file, subprogramFlags = "Optimized"
+>
+
+// CHECK-LABEL: declare !dbg
+// CHECK-SAME: ![[SUBPROGRAM:.*]] i32 @func_decl_with_subprogram(
+llvm.func @func_decl_with_subprogram() -> (i32) loc(fused<#di_subprogram>["foo.mlir":2:1])
+
+// CHECK: ![[SUBPROGRAM]] = !DISubprogram(name: "func_decl_with_subprogram", scope: ![[FILE:.*]], file: ![[FILE]], spFlags: DISPFlagOptimized)
+// CHECK: ![[FILE:.*]] = !DIFile(filename: "foo.mlir", directory: "/test/")
----------------
gysit wrote:
```suggestion
// CHECK: ![[FILE]] = !DIFile(filename: "foo.mlir", directory: "/test/")
```
Shouldn't this match the FILE variable matched above?
https://github.com/llvm/llvm-project/pull/78026
More information about the Mlir-commits
mailing list