1 // RUN: mlir-opt %s -split-input-file | FileCheck %s
3 #di_file = #llvm.di_file<"file.cpp" in "/folder/">
4 #di_compile_unit = #llvm.di_compile_unit<
5 id = distinct[0]<>, sourceLanguage = DW_LANG_C_plus_plus_14, file = #di_file,
6 isOptimized = true, emissionKind = Full
8 #di_subprogram = #llvm.di_subprogram<
9 compileUnit = #di_compile_unit, scope = #di_file,
10 name = "missing_debug_loc", file = #di_file,
11 subprogramFlags = "Definition|Optimized"
13 #di_subprogram1 = #llvm.di_subprogram<
14 compileUnit = #di_compile_unit, scope = #di_file,
15 name = "invalid_call_debug_locs", file = #di_file,
16 subprogramFlags = "Definition|Optimized"
19 #loc1 = loc("file.cpp":24:0)
20 #loc2 = loc(fused<#di_subprogram>[#loc1])
21 #loc3 = loc("file.cpp":42:0)
22 #loc4 = loc(fused<#di_subprogram1>[#loc3])
24 llvm.func @external_func() loc(#loc2)
26 llvm.func @call_debug_locs() {
27 llvm.call @external_func() : () -> () loc(#loc)
31 // CHECK: llvm.call @external_func()