• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: rm -rf %t
2// RUN: %clang_cc1 -debug-info-kind=limited -fmodules \
3// RUN:     -DGREETING="Hello World" -UNDEBUG \
4// RUN:     -fimplicit-module-maps -fmodules-cache-path=%t %s \
5// RUN:     -I %S/Inputs -isysroot /tmp/.. -I %t -emit-llvm -o - \
6// RUN:     | FileCheck %s --check-prefix=NOIMPORT
7
8// NOIMPORT-NOT: !DIImportedEntity
9// NOIMPORT-NOT: !DIModule
10
11// RUN: rm -rf %t
12// RUN: %clang_cc1 -debug-info-kind=limited -fmodules \
13// RUN:    -DGREETING="Hello World" -UNDEBUG \
14// RUN:    -fimplicit-module-maps -fmodules-cache-path=%t %s \
15// RUN:    -I %S/Inputs -isysroot /tmp/.. -I %t -emit-llvm \
16// RUN:    -debugger-tuning=lldb -o - | FileCheck %s
17
18// CHECK: ![[CU:.*]] = distinct !DICompileUnit
19// CHECK-SAME:  sysroot: "/tmp/..")
20@import DebugObjC;
21// CHECK: !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: ![[CU]],
22// CHECK-SAME:              entity: ![[MODULE:.*]], file: ![[F:[0-9]+]],
23// CHECK-SAME:              line: [[@LINE-3]])
24// CHECK: ![[MODULE]] = !DIModule(scope: null, name: "DebugObjC",
25// CHECK-SAME:  configMacros: "\22-DGREETING=Hello World\22 \22-UNDEBUG\22",
26// CHECK-SAME:  includePath: "{{.*}}test{{.*}}Modules{{.*}}Inputs"
27// CHECK: ![[F]] = !DIFile(filename: {{.*}}debug-info-moduleimport.m
28
29// RUN: %clang_cc1 -debug-info-kind=limited -fmodules -fimplicit-module-maps \
30// RUN:   -fmodules-cache-path=%t %s -I %S/Inputs -isysroot /tmp/.. -I %t \
31// RUN:   -emit-llvm -o - | FileCheck %s --check-prefix=NO-SKEL-CHECK
32// NO-SKEL-CHECK: distinct !DICompileUnit
33// NO-SKEL-CHECK-NOT: distinct !DICompileUnit
34
35// RUN: %clang_cc1 -debug-info-kind=limited -fmodules -fimplicit-module-maps \
36// RUN:   -fmodules-cache-path=%t -fdebug-prefix-map=%t=/MODULE-CACHE \
37// RUN:   -fdebug-prefix-map=%S=/SRCDIR \
38// RUN:   -fmodule-format=obj -dwarf-ext-refs \
39// RUN:   %s -I %S/Inputs -isysroot /tmp/.. -I %t -emit-llvm -o - \
40// RUN:     | FileCheck %s --check-prefix=SKEL-CHECK
41// SKEL-CHECK: includePath: "/SRCDIR/Inputs"
42// SKEL-CHECK: distinct !DICompileUnit({{.*}}file: ![[CUFILE:[0-9]+]]
43// SKEL-CHECK: ![[CUFILE]] = !DIFile({{.*}}directory: "[[COMP_DIR:.*]]"
44// SKEL-CHECK: distinct !DICompileUnit({{.*}}file: ![[DWOFILE:[0-9]+]]{{.*}}splitDebugFilename: "/MODULE-CACHE{{.*}}dwoId
45// SKEL-CHECK: ![[DWOFILE]] = !DIFile({{.*}}directory: "[[COMP_DIR]]"
46