@@ -286,3 +286,24 @@ llvm.func @dbg_intrinsics_with_no_location(%arg0: i32) -> (i32) {
286
286
#di_basic_type_2 = #llvm.di_basic_type <tag = DW_TAG_base_type , name = " uint64_t" , sizeInBits = 64 , encoding = DW_ATE_unsigned >
287
287
llvm.mlir.global external @global_with_expr_1 () {addr_space = 0 : i32 , dbg_expr = #llvm.di_global_variable_expression <var = <scope = #di_compile_unit_2 , name = " global_with_expr_1" , linkageName = " global_with_expr_1" , file = #di_file_2 , line = 370 , type = #di_basic_type_2 >, expr = <>>} : i64
288
288
llvm.mlir.global external @global_with_expr_2 () {addr_space = 0 : i32 , dbg_expr = #llvm.di_global_variable_expression <var = <scope = #di_compile_unit_2 , name = " global_with_expr_2" , linkageName = " global_with_expr_2" , file = #di_file_2 , line = 371 , type = #di_basic_type_2 , isLocalToUnit = true , isDefined = true , alignInBits = 8 >, expr = <>>} : i64
289
+
290
+ // -----
291
+
292
+ // CHECK-DAG: ![[FILE1:.*]] = !DIFile(filename: "foo1.mlir", directory: "/test/")
293
+ #di_file_1 = #llvm.di_file <" foo1.mlir" in " /test/" >
294
+ // CHECK-DAG: ![[FILE2:.*]] = !DIFile(filename: "foo2.mlir", directory: "/test/")
295
+ #di_file_2 = #llvm.di_file <" foo2.mlir" in " /test/" >
296
+ // CHECK-DAG: ![[SCOPE2:.*]] = distinct !DICompileUnit(language: DW_LANG_C, file: ![[FILE2]], producer: "MLIR", isOptimized: true, runtimeVersion: 0, emissionKind: DebugDirectivesOnly)
297
+ #di_compile_unit_1 = #llvm.di_compile_unit <sourceLanguage = DW_LANG_C , file = #di_file_1 , producer = " MLIR" , isOptimized = true , emissionKind = LineTablesOnly >
298
+ // CHECK-DAG: ![[SCOPE1:.*]] = distinct !DICompileUnit(language: DW_LANG_C, file: ![[FILE1]], producer: "MLIR", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly)
299
+ #di_compile_unit_2 = #llvm.di_compile_unit <sourceLanguage = DW_LANG_C , file = #di_file_2 , producer = " MLIR" , isOptimized = true , emissionKind = DebugDirectivesOnly >
300
+ #di_subprogram_1 = #llvm.di_subprogram <compileUnit = #di_compile_unit_1 , scope = #di_file_1 , name = " func1" , file = #di_file_1 , subprogramFlags = " Definition|Optimized" >
301
+ #di_subprogram_2 = #llvm.di_subprogram <compileUnit = #di_compile_unit_2 , scope = #di_file_2 , name = " func2" , file = #di_file_2 , subprogramFlags = " Definition|Optimized" >
302
+
303
+ llvm.func @func_line_tables () {
304
+ llvm.return
305
+ } loc (fused <#di_subprogram_1 >[" foo1.mlir" :0 :0 ])
306
+
307
+ llvm.func @func_debug_directives () {
308
+ llvm.return
309
+ } loc (fused <#di_subprogram_2 >[" foo2.mlir" :0 :0 ])
0 commit comments