brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · bf6c03e Raw
65 lines · plain
1// This test checks that the module map paths we're reporting are the as-requested2// paths (as opposed to the paths files resolve to after going through VFS overlays).3 4// RUN: rm -rf %t5// RUN: split-file %s %t6 7//--- real/module.modulemap8framework module FW { header "Header.h" }9//--- real/Header.h10//--- overlay.json.template11{12  "case-sensitive": "false",13  "version": "0",14  "roots": [15    {16      "contents": [17        {18          "external-contents" : "DIR/real/Header.h",19          "name" : "Header.h",20          "type" : "file"21        }22      ],23      "name": "DIR/frameworks/FW.framework/Headers",24      "type": "directory"25    },26    {27      "contents": [28        {29          "external-contents": "DIR/real/module.modulemap",30          "name": "module.modulemap",31          "type": "file"32        }33      ],34      "name": "DIR/frameworks/FW.framework/Modules",35      "type": "directory"36    }37  ]38}39 40//--- modules/module.modulemap41module Importer { header "header.h" }42//--- modules/header.h43#include <FW/Header.h>44 45//--- cdb.json.template46[{47  "file": "DIR/tu.m",48  "directory": "DIR",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"50}]51 52//--- tu.m53@import Importer;54 55// RUN: sed -e "s|DIR|%/t|g" %t/overlay.json.template > %t/overlay.json56// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json57// RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/result.json58 59// RUN: %deps-to-rsp %t/result.json --module-name=FW > %t/FW.cc1.rsp60// RUN: %deps-to-rsp %t/result.json --module-name=Importer > %t/Importer.cc1.rsp61// RUN: %deps-to-rsp %t/result.json --tu-index=0 > %t/tu.rsp62// RUN: %clang @%t/FW.cc1.rsp63// RUN: %clang @%t/Importer.cc1.rsp64// RUN: %clang @%t/tu.rsp65