Frontend: Add a CC1 flag to dump module dependencies to a directory
authorJustin Bogner <mail@justinbogner.com>
Thu, 19 Jun 2014 19:36:03 +0000 (19:36 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 19 Jun 2014 19:36:03 +0000 (19:36 +0000)
commit86d1259ca78b291cd5e11e5aaf797d8c387643f2
tree9cc300d4e4303632bb3d108a4b41de94da5e4f82
parentcd45f963e2bbd97ad7cb657e668ef7ca3de7ee27
Frontend: Add a CC1 flag to dump module dependencies to a directory

This adds the -module-dependency-dir to clang -cc1, which specifies a
directory to copy all of a module's dependencies into in a form
suitable to be used as a VFS using -ivfsoverlay with the generated
vfs.yaml.

This is useful for crashdumps that involve modules, so that the module
dependencies will be intact when a crash report script is used to
reproduce a problem on another machine.

We currently encode the absolute path to the dump directory, due to
limitations in the VFS system. Until we can handle relative paths in
the VFS, users of the VFS map may need to run a simple search and
replace in the file.

llvm-svn: 211303
clang/include/clang/Driver/Options.td
clang/include/clang/Frontend/CompilerInstance.h
clang/include/clang/Frontend/DependencyOutputOptions.h
clang/include/clang/Frontend/Utils.h
clang/lib/Frontend/CMakeLists.txt
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/ModuleDependencyCollector.cpp [new file with mode: 0644]
clang/test/Modules/dependency-dump-dependent-module.m [new file with mode: 0644]
clang/test/Modules/dependency-dump.m [new file with mode: 0644]