File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ // UNSUPPORTED: system-windows
2+ // RUN: rm -rf %t
3+ // RUN: split-file %s %t
4+
5+ // Verify the stable dir path.
6+ //--- Sysroot/usr/include/SysA/module.modulemap
7+ module SysA {
8+ header "SysA.h"
9+ }
10+
11+ //--- Sysroot/usr/include/SysA/SysA.h
12+ int SysVal = 42 ;
13+
14+ //--- cdb.json.template
15+ [{
16+ "file" : "",
17+ " directory ": " DIR ",
18+ " command ": " clang - fmodules - fmodules - cache - path = DIR /cache - isysroot DIR /Sysroot - IDIR /Sysroot /usr /include - x c "
19+ }]
20+
21+ // RUN: sed "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
22+ // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full -module-names=SysA > %t/result.json
23+ // RUN: cat %t/result.json | sed 's:\\\\\?:/:g' | FileCheck -DPREFIX=%/t %s
24+
25+ // CHECK: {
26+ // CHECK-NEXT: "modules": [
27+ // CHECK-NEXT: {
28+ // CHECK-NEXT: "is-in-stable-directories": true,
29+ // CHECK-NEXT: "clang-module-deps": [],
30+ // CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/Sysroot/usr/include/SysA/module.modulemap",
31+ // CHECK-NEXT: "command-line": [
32+ // CHECK: ],
33+ // CHECK-NEXT: "context-hash": "{{.*}}",
34+ // CHECK-NEXT: "file-deps": [
35+ // CHECK-NEXT: "[[PREFIX]]/Sysroot/usr/include/SysA/module.modulemap",
36+ // CHECK-NEXT: "[[PREFIX]]/Sysroot/usr/include/SysA/SysA.h"
37+ // CHECK-NEXT: ],
38+ // CHECK-NEXT: "link-libraries": [],
39+ // CHECK-NEXT: "name": "SysA"
40+ // CHECK-NEXT: }
41+ // CHECK-NEXT: ],
42+ // CHECK-NEXT: "translation-units": []
43+ // CHECK-NEXT: }
You can’t perform that action at this time.
0 commit comments