1 // This test checks that the module map paths we're reporting are the as-requested
2 // paths (as opposed to the paths files resolve to after going through VFS overlays).
5 // RUN: split-file %s %t
7 //--- real/module.modulemap
8 framework module FW { header "Header.h" }
10 //--- overlay.json.template
12 "case-sensitive": "false",
18 "external-contents" : "DIR/real/Header.h",
23 "name": "DIR/frameworks/FW.framework/Headers",
29 "external-contents": "DIR/real/module.modulemap",
30 "name": "module.modulemap",
34 "name": "DIR/frameworks/FW.framework/Modules",
40 //--- modules/module.modulemap
41 module Importer { header "header.h" }
42 //--- modules/header.h
43 #include <FW/Header.h>
45 //--- cdb.json.template
49 "command": "clang -fmodules -fmodules-cache-path=DIR/cache -Werror=non-modular-include-in-module -ivfsoverlay DIR/overlay.json -F DIR/frameworks -I DIR/modules -c DIR/tu.m -o DIR/tu.o"
55 // RUN: sed -e "s|DIR|%/t|g" %t/overlay.json.template > %t/overlay.json
56 // RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
57 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/result.json
59 // RUN: %deps-to-rsp %t/result.json --module-name=FW > %t/FW.cc1.rsp
60 // RUN: %deps-to-rsp %t/result.json --module-name=Importer > %t/Importer.cc1.rsp
61 // RUN: %deps-to-rsp %t/result.json --tu-index=0 > %t/tu.rsp
62 // RUN: %clang @%t/FW.cc1.rsp
63 // RUN: %clang @%t/Importer.cc1.rsp
64 // RUN: %clang @%t/tu.rsp