diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-12-11 04:27:28 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-12-11 04:27:28 +0000 |
commit | 181225b8a3134b2a78be3734a409645045106ecd (patch) | |
tree | 580788f1206a6576cf35253c63675132199502c4 /clang/lib/Lex/HeaderSearch.cpp | |
parent | dc43d75ac0dd0bdd83ceed7436894dd8e3e79561 (diff) | |
download | bcm5719-llvm-181225b8a3134b2a78be3734a409645045106ecd.tar.gz bcm5719-llvm-181225b8a3134b2a78be3734a409645045106ecd.zip |
[CrashReproducer] Collect headermap files
Include headermaps (.hmap files) in the .cache directory and
add VFS entries. All headermaps are known after HeaderSearch
setup, collect them right after.
rdar://problem/27913709
llvm-svn: 289360
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index 0aef7ff5c40..72e8b456822 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -121,6 +121,13 @@ const HeaderMap *HeaderSearch::CreateHeaderMap(const FileEntry *FE) { return nullptr; } +/// \brief Get filenames for all registered header maps. +void HeaderSearch::getHeaderMapFileNames( + SmallVectorImpl<std::string> &Names) const { + for (auto &HM : HeaderMaps) + Names.push_back(HM.first->getName()); +} + std::string HeaderSearch::getModuleFileName(Module *Module) { const FileEntry *ModuleMap = getModuleMap().getModuleMapFileForUniquing(Module); |