Go to file
Bruno Cardoso Lopes 016b2d0ddc Reapply [VFS] Add 'overlay-relative' field to YAML files
This reapplies r261552.

The VFS overlay mapping between virtual paths and real paths is done through
the 'external-contents' entries in YAML files, which contains hardcoded paths
to the real files.

When a module compilation crashes, headers are dumped into <name>.cache/vfs
directory and are mapped via the <name>.cache/vfs/vfs.yaml. The script
generated for reproduction uses -ivfsoverlay pointing to file to gather the
mapping between virtual paths and files inside <name>.cache/vfs. Currently, we
are only capable of reproducing such crashes in the same machine as they
happen, because of the hardcoded paths in 'external-contents'.

To be able to reproduce a crash in another machine, this patch introduces a new
option in the VFS yaml file called 'overlay-relative'. When it's equal to
'true' it means that the provided path to the YAML file through the
-ivfsoverlay option should also be used to prefix the final path for every
'external-contents'.

Example, given the invocation snippet "... -ivfsoverlay
<name>.cache/vfs/vfs.yaml" and the following entry in the yaml file:

"overlay-relative": "true",
"roots": [
...
  "type": "directory",
  "name": "/usr/include",
  "contents": [
    {
      "type": "file",
      "name": "stdio.h",
      "external-contents": "/usr/include/stdio.h"
    },
...

Here, a file manager request for virtual "/usr/include/stdio.h", that will map
into real path "/<absolute_path_to>/<name>.cache/vfs/usr/include/stdio.h.

This is a useful feature for debugging module crashes in machines other than
the one where the error happened.

Differential Revision: http://reviews.llvm.org/D17457

rdar://problem/24499339

llvm-svn: 263748
2016-03-17 21:11:23 +00:00
clang Reapply [VFS] Add 'overlay-relative' field to YAML files 2016-03-17 21:11:23 +00:00
clang-tools-extra Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes. 2016-03-17 17:02:25 +00:00
compiler-rt Removing a non-intentional debug output that got committed in r263695. 2016-03-17 09:27:40 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Fix ilogb(double) return type 2016-02-24 00:52:15 +00:00
libcxx unord: Extract key to avoid preemptive mallocs in insert/emplace 2016-03-17 20:45:20 +00:00
libcxxabi [libcxxabi] Disable cxa_thread_atexit_test if unavailable 2016-03-17 10:00:24 +00:00
libunwind [AArch64] Fix libunwind build when using GNU assembler 2016-02-11 21:22:57 +00:00
lld [COFF] Use coff_section::getAlignment 2016-03-17 16:58:08 +00:00
lldb Fix deadlock due to thread list locking in 'bt all' with obj-c 2016-03-17 18:52:41 +00:00
llgo [llgo] Roll gofrontend forward 2016-03-15 05:36:43 +00:00
llvm [Support] Make Error::isA<T>() works on success values. 2016-03-17 20:35:00 +00:00
openmp [CMake] Fix Windows build problem for CMake versions < 3.3 2016-03-16 18:44:18 +00:00
polly ScopInfo: Do not generate dependences for i1 values used in affine branches 2016-03-16 23:33:54 +00:00