1 // This test checks that we're not canonicalizing framework directories that
2 // play a role in VFS remapping. This could lead header search to fail when
3 // building that module.
6 // RUN: split-file %s %t
10 // RUN: mkdir -p %t/frameworks-symlink
11 // RUN: ln -s %t/frameworks/FW.framework %t/frameworks-symlink/FW.framework
13 // RUN: mkdir -p %t/copy
14 // RUN: cp %t/frameworks/FW.framework/Headers/FW.h %t/copy
15 // RUN: cp %t/frameworks/FW.framework/Headers/Header.h %t/copy
17 //--- frameworks/FW.framework/Modules/module.modulemap
18 framework module FW
{ umbrella header
"FW.h" }
19 //--- frameworks/FW.framework/Headers/FW.h
21 //--- frameworks/FW.framework/Headers/Header.h
27 //--- overlay.json.template
30 "case-sensitive": "false",
35 "external-contents": "DIR/copy/Header.h",
40 "external-contents": "DIR/copy/FW.h",
45 "name": "DIR/frameworks-symlink/FW.framework/Headers",
51 //--- cdb.json.template
55 "command": "clang -fmodules -fmodules-cache-path=DIR/cache -ivfsoverlay DIR/overlay.json -F DIR/frameworks-symlink -c DIR/tu.m -o DIR/tu.o -Werror=non-modular-include-in-framework-module"
58 // RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
59 // RUN: sed -e "s|DIR|%/t|g" %t/overlay.json.template > %t/overlay.json
61 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/result.json
62 // RUN: cat %t/result.json | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t
65 // CHECK-NEXT: "modules": [
67 // CHECK-NEXT: "clang-module-deps": [],
68 // CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/frameworks-symlink/FW.framework/Modules/module.modulemap",
69 // CHECK-NEXT: "command-line": [
70 // CHECK-NEXT: "-cc1",
71 // CHECK: "-emit-module",
73 // CHECK-NEXT: "objective-c",
74 // CHECK-NEXT: "[[PREFIX]]/frameworks-symlink/FW.framework/Modules/module.modulemap",
76 // CHECK-NEXT: "context-hash": "{{.*}}",
77 // CHECK-NEXT: "file-deps": [
78 // CHECK-NEXT: "[[PREFIX]]/copy/FW.h",
79 // CHECK-NEXT: "[[PREFIX]]/copy/Header.h",
80 // CHECK-NEXT: "[[PREFIX]]/frameworks-symlink/FW.framework/Modules/module.modulemap"
82 // CHECK-NEXT: "name": "FW"
85 // CHECK-NEXT: "translation-units": [
89 // RUN: %deps-to-rsp %t/result.json --module-name=FW > %t/FW.cc1.rsp
90 // RUN: %clang @%t/FW.cc1.rsp