Clang Project

clang_source_code/test/VFS/subframework-symlink.m
1// REQUIRES: shell
2
3// Test that when a subframework is a symlink to another framework, we don't
4// add it as a submodule to the enclosing framework. We also need to make clang
5// to infer module for the enclosing framework. For this we don't have
6// a module map for the framework itself but have it in a parent directory.
7//
8// RUN: rm -rf %t
9// RUN: mkdir %t
10// RUN: echo 'framework module * {}' > %t/module.modulemap
11// RUN: mkdir -p %t/WithSubframework.framework/Headers
12// RUN: echo '#include <Foo/Foo.h>' > %t/WithSubframework.framework/Headers/WithSubframework.h
13// RUN: cp -R %S/Inputs/Foo.framework %t
14// RUN: mkdir -p %t/WithSubframework.framework/Frameworks
15// RUN: ln -s %t/Foo.framework %t/WithSubframework.framework/Frameworks
16// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache1 -F %t -fsyntax-only %s
17
18// Adding VFS overlay shouldn't change this behavior.
19//
20// RUN: sed -e "s:INPUT_DIR:/InvalidPath:g" -e "s:OUT_DIR:/InvalidPath:g" %S/Inputs/vfsoverlay.yaml > %t/overlay.yaml
21// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache2 -F %t -fsyntax-only %s -ivfsoverlay %t/overlay.yaml
22
23#import <WithSubframework/WithSubframework.h>
24