|
1 | 1 | ; Tests that we add DILabels for the suspend points. |
2 | 2 | ; |
3 | | -; We check both the generated LLVM: |
| 3 | +; Check the generated LLVM: |
4 | 4 | ; RUN: opt < %s -passes='cgscc(coro-split)' -S | FileCheck %s |
5 | 5 | ; |
6 | | -; And the debug info: |
| 6 | +; Check the generated DWARF debug info: |
7 | 7 | ; REQUIRES: object-emission |
8 | 8 | ; RUN: opt < %s -passes='cgscc(coro-split),coro-cleanup' \ |
9 | 9 | ; RUN: | %llc_dwarf -O0 -filetype=obj -o - \ |
10 | 10 | ; RUN: | llvm-dwarfdump - \ |
11 | 11 | ; RUN: | FileCheck %s -check-prefix=DWARF |
| 12 | +; |
| 13 | +; Check that we don't emit any DILabel if in `LineTablesOnly` mode |
| 14 | +; RUN: sed -e 's/emissionKind: FullDebug/emissionKind: LineTablesOnly/' %s \ |
| 15 | +; RUN: | opt -passes='cgscc(coro-split)' -S \ |
| 16 | +; RUN: | FileCheck %s -check-prefix=LINE-TABLE |
12 | 17 |
|
13 | 18 | source_filename = "coro.c" |
14 | 19 |
|
@@ -83,6 +88,12 @@ coro_Suspend: ; preds = %for.cond, %if.then, |
83 | 88 | ; CHECK: ![[DESTROY_0]] = !DILabel(scope: !{{[0-9]+}}, name: "__coro_resume_0", file: !{{[0-9]*}}, line: 12, column: 6, isArtificial: true, coroSuspendIdx: 0) |
84 | 89 | ; CHECK: ![[DESTROY_1]] = !DILabel(scope: !{{[0-9]+}}, name: "__coro_resume_1", file: !{{[0-9]*}}, line: 14, column: 6, isArtificial: true, coroSuspendIdx: 1) |
85 | 90 |
|
| 91 | +; Check the we do not emit any DILabels in LineTableOnly mode. |
| 92 | +; The DWARF emitter cannot handle this and would run into an assertion |
| 93 | +; LINE-TABLE: !DICompileUnit{{.*}}LineTablesOnly |
| 94 | +; LINE-TABLE-NOT: DILabel |
| 95 | + |
| 96 | + |
86 | 97 | ; DWARF: {{.*}}DW_TAG_label |
87 | 98 | ; DWARF-NEXT: DW_AT_name ("__coro_resume_0") |
88 | 99 | ; DWARF-NEXT: DW_AT_decl_file |
|
0 commit comments