[flang-commits] [flang] [mlir] [mlir][debuginfo] Add support for subprogram annotations (PR #110946)

Christian Ulmann via flang-commits flang-commits at lists.llvm.org
Mon Oct 7 04:14:16 PDT 2024


================
@@ -816,3 +816,28 @@ define void @imp_fn() !dbg !12 {
 ; CHECK-DAG:  #[[SP_REC:.+]] = #llvm.di_subprogram<recId = distinct{{.*}}<>, isRecSelf = true>
 ; CHECK-DAG: #[[IE:.+]] = #llvm.di_imported_entity<tag = DW_TAG_imported_module, scope = #[[SP_REC]], entity = #[[M]]{{.*}}>
 ; CHECK-DAG: #[[SP:.+]] = #llvm.di_subprogram<{{.*}}name = "imp_fn"{{.*}}retainedNodes = #[[IE]]>
+
+; // -----
+
+; Test that annotations are handled correctly
+
+define void @fn_with_annotations() !dbg !12 {
----------------
Dinistro wrote:

```suggestion
; CHECK-LABEL: @fn_with_annotations
define void @fn_with_annotations() !dbg !12 {
```
Can you add this to ensure that the scope of where the search for the subprogram happens is reduced?

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


More information about the flang-commits mailing list