-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathClangModuleBreadcrumbs.swift
32 lines (23 loc) · 1.52 KB
/
ClangModuleBreadcrumbs.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// RUN: %target-swift-frontend -emit-ir %s -g -I %S/Inputs \
// RUN: -Xcc -DFOO="foo" -Xcc -UBAR -o - | %FileCheck %s
//
// RUN: %target-swift-frontend -emit-ir %s -g -I %S/Inputs \
// RUN: -Xcc -DFOO="foo" -Xcc -UBAR -o - -no-clang-module-breadcrumbs \
// RUN: | %FileCheck %s --check-prefix=NONE
//
// RUN: %target-swift-frontend -module-cache-path %t.mcp -emit-ir %s \
// RUN: -g -I %S/Inputs -Xcc -DFOO="foo" -Xcc -UBAR \
// RUN: -debug-prefix-map %t.mcp=PREFIX \
// RUN: -o - | %FileCheck %s --check-prefix=REMAP
import ClangModule.SubModule
import OtherClangModule.SubModule
let _ = someFunc(0)
// Check for Clang module breadcrumbs.
// CHECK: !DICompileUnit(language: DW_LANG_{{ObjC|C99|C11}},{{.*}} producer: "{{.*}}Swift{{.*}}ClangModule{{.*}}dwoId:
// CHECK: !DICompileUnit(language: DW_LANG_{{ObjC|C99|C11}}, {{.*}} producer: "{{.*}}Swift{{.*}}OtherClangModule{{.*}}dwoId:
// CHECK: !DICompileUnit(language: DW_LANG_{{ObjC|C99|C11}},{{.*}} producer: "{{.*}}clang{{.*}}ClangModule{{.*}}dwoId:
// NONE: DICompileUnit({{.*}}
// NONE-NOT: DICompileUnit({{.*}}ClangModule
// REMAP: !DICompileUnit(language: DW_LANG_{{ObjC|C99|C11}},{{.*}} producer: "{{.*}}Swift{{.*}}PREFIX{{/|\\\\}}{{.*}}{{/|\\\\}}ClangModule{{.*}}dwoId:
// REMAP: !DICompileUnit(language: DW_LANG_{{ObjC|C99|C11}},{{.*}} producer: "{{.*}}Swift{{.*}}PREFIX{{/|\\\\}}{{.*}}{{/|\\\\}}OtherClangModule{{.*}}dwoId:
// REMAP: !DICompileUnit(language: DW_LANG_{{ObjC|C99|C11}},{{.*}} producer: "{{.*}}clang{{.*}}PREFIX{{/|\\\\}}{{.*}}{{/|\\\\}}ClangModule{{.*}}dwoId: