64 lines · plain
1// RUN: rm -rf %t.dir2// RUN: split-file %s %t.dir3// RUN: sed -e "s|DIR|%/t.dir|g" %t.dir/build/compile-commands.json.in > %t.dir/build/compile-commands.json4// RUN: sed -e "s|DIR|%/t.dir|g" %t.dir/build/vfs.yaml.in > %t.dir/build/vfs.yaml5// RUN: clang-scan-deps -compilation-database %t.dir/build/compile-commands.json \6// RUN: -j 1 -format experimental-full -mode preprocess-dependency-directives > %t.db7// RUN: %deps-to-rsp %t.db --module-name=A > %t.A.cc1.rsp8// RUN: cat %t.A.cc1.rsp | sed 's:\\\\\?:/:g' | FileCheck %s9 10// CHECK-NOT: build/module.modulemap11// CHECK: A/module.modulemap12// CHECK-NOT: build/module.modulemap13 14//--- build/compile-commands.json.in15 16[17{18 "directory": "DIR",19 "command": "clang DIR/main.m -Imodules/A -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps -ivfsoverlay build/vfs.yaml",20 "file": "DIR/main.m"21},22{23 "directory": "DIR",24 "command": "clang DIR/main.m -Imodules/A -fmodules -Xclang -fno-modules-share-filemanager -fmodules-cache-path=DIR/module-cache-unshared -fimplicit-modules -fimplicit-module-maps -ivfsoverlay build/vfs.yaml",25 "file": "DIR/main.m"26}27]28 29//--- build/module.modulemap30 31module A {32 umbrella header "A.h"33}34 35//--- modules/A/A.h36 37typedef int A_t;38 39//--- build/vfs.yaml.in40 41{42 "version": 0,43 "case-sensitive": "false",44 "use-external-names": true,45 "roots": [46 {47 "contents": [48 {49 "external-contents": "DIR/build/module.modulemap",50 "name": "module.modulemap",51 "type": "file"52 }],53 "name": "DIR/modules/A",54 "type": "directory"55 }56 ]57}58 59//--- main.m60 61@import A;62 63A_t a = 0;64