brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · e4983bc Raw
55 lines · c
1// RUN: rm -rf %t2// RUN: split-file %s %t3// Unsupported on AIX because we don't support the requisite "__clangast"4// section in XCOFF yet.5// UNSUPPORTED: system-windows, target={{.*}}-aix{{.*}}6 7//--- cdb_pch.json8[9  {10    "directory": "DIR",11    "command": "clang -x c-header DIR/pch.h -fmodules -gmodules -fimplicit-module-maps -fmodules-cache-path=DIR/cache -o DIR/pch.h.gch",12    "file": "DIR/pch.h"13  }14]15 16//--- cdb_tu.json17[18  {19    "directory": "DIR",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",21    "file": "DIR/tu.c"22  }23]24 25//--- module.modulemap26module mod { header "symlink.h" }27 28//--- pch.h29#include "symlink.h"30 31//--- original.h32// Comment that will be stripped by the minimizer.33#define MACRO 134 35//--- tu.c36#include "original.h"37static int foo = MACRO; // Macro usage that will trigger38                        // input file consistency checks.39 40// RUN: ln -s %t/original.h %t/symlink.h41 42// RUN: sed -e "s|DIR|%/t|g" %t/cdb_pch.json > %t/cdb.json43// RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full \44// RUN:   -module-files-dir %t/build > %t/result_pch.json45//46// RUN: %deps-to-rsp %t/result_pch.json --module-name=mod > %t/mod.cc1.rsp47// RUN: %deps-to-rsp %t/result_pch.json --tu-index=0 > %t/pch.rsp48//49// RUN: %clang @%t/mod.cc1.rsp50// RUN: %clang @%t/pch.rsp51 52// RUN: sed -e "s|DIR|%/t|g" %t/cdb_tu.json > %t/cdb.json53// RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full \54// RUN:   -module-files-dir %t/build > %t/result_tu.json55