// RUN: rm -rf %t
// RUN: split-file %s %t
// Unsupported on AIX because we don't support the requisite "__clangast"
// section in XCOFF yet.
// UNSUPPORTED: system-windows, aix
//--- cdb_pch.json
//--- cdb_tu.json
//--- module.modulemap
module mod
//--- pch.h
//--- original.h
// Comment that will be stripped by the minimizer.
//--- tu.c
static int foo = MACRO; // Macro usage that will trigger
// input file consistency checks.
// RUN: ln -s %t/original.h %t/symlink.h
// RUN: sed -e "s|DIR|%/t|g" %t/cdb_pch.json > %t/cdb.json
// RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full \
// RUN: -generate-modules-path-args -module-files-dir %t/build > %t/result_pch.json
//
// RUN: %deps-to-rsp %t/result_pch.json --module-name=mod > %t/mod.cc1.rsp
// RUN: %deps-to-rsp %t/result_pch.json --tu-index=0 > %t/pch.rsp
//
// RUN: %clang @%t/mod.cc1.rsp
// RUN: %clang @%t/pch.rsp
// RUN: sed -e "s|DIR|%/t|g" %t/cdb_tu.json > %t/cdb.json
// RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full \
// RUN: -generate-modules-path-args -module-files-dir %t/build > %t/result_tu.json