Skip to content

Commit fa9dc86

Browse files
Merge pull request #83547 from cachemeifyoucan/eng/PR-156759645-rebranch
[TEST-ONLY] Check swift generated PCM has correct dwo path
2 parents 35f52ab + b103f31 commit fa9dc86

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

test/CAS/debug_info_pcm.swift

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// REQUIRES: OS=macosx
2+
// RUN: %empty-directory(%t)
3+
// RUN: split-file %s %t
4+
5+
// RUN: %target-swift-frontend -scan-dependencies -module-name Test -module-cache-path %t/clang-module-cache -O \
6+
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import \
7+
// RUN: %t/test.swift -o %t/deps.json -cache-compile-job -cas-path %t/cas -I %t/include
8+
9+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/shim.cmd
10+
// RUN: %swift_frontend_plain @%t/shim.cmd
11+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:B > %t/B.cmd
12+
// RUN: %swift_frontend_plain @%t/B.cmd
13+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:A > %t/A.cmd
14+
// RUN: %swift_frontend_plain @%t/A.cmd
15+
// RUN: %{python} %S/Inputs/SwiftDepsExtractor.py %t/deps.json clang:A modulePath > %t/A.path
16+
17+
// RUN: dwarfdump --debug-info @%t/A.path | %FileCheck %s
18+
19+
// CHECK: DW_AT_GNU_dwo_name
20+
// CHECK-SAME: BUILD_DIR
21+
22+
//--- test.swift
23+
import A
24+
25+
//--- include/a.h
26+
#include "b.h"
27+
struct A {
28+
int a;
29+
};
30+
31+
//--- include/b.h
32+
void b(void);
33+
34+
//--- include/module.modulemap
35+
module A {
36+
header "a.h"
37+
export *
38+
}
39+
40+
module B {
41+
header "b.h"
42+
export *
43+
}

0 commit comments

Comments
 (0)