From fc8644cd62fe1146adbfb729f55b85481ef1f2ee Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Wed, 13 Apr 2016 19:28:21 +0000 Subject: [CrashReproducer] Setup 'use-external-names' in YAML files. Hide the real paths when rebuilding from VFS by setting up the crash reproducer to use 'use-external-names' = false. This way we avoid module redifinition errors and consistently use the same paths against all modules. With this change on Darwin we are able to simulate a crash for a simple application using "Foundation/Foundation.h" (which relies on a bunch of different frameworks and headers) and successfully rebuild all the modules by relying solely at the VFS overlay. llvm-svn: 266234 --- clang/lib/Frontend/ModuleDependencyCollector.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp') diff --git a/clang/lib/Frontend/ModuleDependencyCollector.cpp b/clang/lib/Frontend/ModuleDependencyCollector.cpp index 3e6c0d2..02d3c51 100644 --- a/clang/lib/Frontend/ModuleDependencyCollector.cpp +++ b/clang/lib/Frontend/ModuleDependencyCollector.cpp @@ -112,6 +112,10 @@ void ModuleDependencyCollector::writeFileMap() { // the sensitivity at the path where the headers all collected to. VFSWriter.setCaseSensitivity(isCaseSensitivePath(VFSDir)); + // Do not rely on real path names when executing the crash reproducer scripts + // since we only want to actually use the files we have on the VFS cache. + VFSWriter.setUseExternalNames(false); + std::error_code EC; SmallString<256> YAMLPath = VFSDir; llvm::sys::path::append(YAMLPath, "vfs.yaml"); -- cgit v1.1