xref: /llvm-project/clang/test/Modules/DebugInfoTransitiveImport.m (revision 7793e676514bc102e97a993e90257e8628069a8b)
1// UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}
2// RUN: rm -rf %t
3// RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info-kind=limited -dwarf-ext-refs \
4// RUN:     -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs \
5// RUN:     %s -mllvm -debug-only=pchcontainer -debugger-tuning=lldb 2>&1 | FileCheck %s
6// REQUIRES: asserts
7
8@import diamond_left;
9
10// Definition of top:
11// CHECK: !DICompileUnit({{.*}}dwoId:
12// CHECK: !DIFile({{.*}}diamond_top.h
13
14// Definition of left:
15// CHECK: !DICompileUnit({{.*}}dwoId:
16// CHECK: !DIImportedEntity(tag: DW_TAG_imported_declaration,
17// CHECK-SAME:              entity: ![[MODULE:.*]], file: ![[LEFT:.*]], line: 3)
18// CHECK: ![[MODULE]] = !DIModule(scope: null, name: "diamond_top"
19// CHECK: ![[LEFT]] = !DIFile({{.*}}diamond_left.h
20
21// Skeleton for top:
22// CHECK: !DICompileUnit({{.*}}splitDebugFilename: {{.*}}diamond_top{{.*}}dwoId:
23
24// RUN: rm -rf %t
25// RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info-kind=limited -dwarf-ext-refs \
26// RUN:     -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs \
27// RUN:     %s -mllvm -debug-only=pchcontainer 2>&1 | FileCheck %s --check-prefix=NOIMPORT
28
29// NOIMPORT-NOT: !DIImportedEntity
30