2 // RUN: split-file %s %t
3 // Unsupported on AIX because we don't support the requisite "__clangast"
4 // section in XCOFF yet.
5 // UNSUPPORTED: system-windows, target={{.*}}-aix{{.*}}
11 "command": "clang -x c-header DIR/pch.h -fmodules -gmodules -fimplicit-module-maps -fmodules-cache-path=DIR/cache -o DIR/pch.h.gch",
20 "command": "clang -c DIR/tu.c -fmodules -gmodules -fimplicit-module-maps -fmodules-cache-path=DIR/cache -include DIR/pch.h -o DIR/tu.o",
25 //--- module.modulemap
26 module mod
{ header
"symlink.h" }
32 // Comment that will be stripped by the minimizer.
37 static int foo
= MACRO
; // Macro usage that will trigger
38 // input file consistency checks.
40 // RUN: ln -s %t/original.h %t/symlink.h
42 // RUN: sed -e "s|DIR|%/t|g" %t/cdb_pch.json > %t/cdb.json
43 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full \
44 // RUN: -module-files-dir %t/build > %t/result_pch.json
46 // RUN: %deps-to-rsp %t/result_pch.json --module-name=mod > %t/mod.cc1.rsp
47 // RUN: %deps-to-rsp %t/result_pch.json --tu-index=0 > %t/pch.rsp
49 // RUN: %clang @%t/mod.cc1.rsp
50 // RUN: %clang @%t/pch.rsp
52 // RUN: sed -e "s|DIR|%/t|g" %t/cdb_tu.json > %t/cdb.json
53 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full \
54 // RUN: -module-files-dir %t/build > %t/result_tu.json