mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-23 21:45:46 -04:00

Default property value 'true' preserves current behavior. Value 'false' can be used to create VFS "root", file system that gives better control over which files compiler can use during compilation as there are no unpredictable accesses to real file system. Non-fallthrough use case changes how we treat multiple VFS overlay files. Instead of all of them being at the same level just above a real file system, now they are nested and subsequent overlays can refer to files in previous overlays. Change is done both in LLVM and Clang, corresponding LLVM commit is r345431. rdar://problem/39465552 Reviewers: bruno, benlangmuir Reviewed By: bruno Subscribers: dexonsmith, cfe-commits, hiraditya Differential Revision: https://reviews.llvm.org/D50539 llvm-svn: 345432
18 lines
764 B
C
18 lines
764 B
C
// REQUIRES: shell
|
|
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: sed -e "s:TEST_DIR:%S:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsroot.yaml > %t.yaml
|
|
// RUN: not %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %S/Inputs -I /direct-vfs-root-files -fsyntax-only /tests/vfsroot-include.c 2>&1 | FileCheck %s
|
|
// The line above tests that the compiler input file is looked up through VFS.
|
|
|
|
// Test successful include through the VFS.
|
|
#include "not_real.h"
|
|
|
|
// Test that a file missing from the VFS root is not found, even if it is
|
|
// discoverable through the real file system. Fatal error should be the last
|
|
// in the file as it hides other errors.
|
|
#include "actual_header.h"
|
|
// CHECK: fatal error: 'actual_header.h' file not found
|
|
// CHECK: 1 error generated.
|
|
// CHECK-NOT: error
|