summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-01-15 22:36:56 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-01-15 22:36:56 +0000
commit0263747edc9ec15228fa5d1ed55ebc626ccc244c (patch)
tree697639363c5416c6d6088865f1e09cc97fcc1d2d
parent72066f8d8e49936c60b42fab742c9bc48e339e5b (diff)
[VFS] Add getter for mapping entries.
When generating a reproducer in LLDB we build up the mapping but don't immediately copy over the files on the file system. Rather than keeping a separate data structure with real and virtual paths, we might as well reuse the entries already stored in the YAMLVFSWriter to lazily copy over the files when needed.
-rw-r--r--llvm/include/llvm/Support/VirtualFileSystem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/VirtualFileSystem.h b/llvm/include/llvm/Support/VirtualFileSystem.h
index 4cc729ef764..61c3d2f46e9 100644
--- a/llvm/include/llvm/Support/VirtualFileSystem.h
+++ b/llvm/include/llvm/Support/VirtualFileSystem.h
@@ -753,6 +753,8 @@ public:
OverlayDir.assign(OverlayDirectory.str());
}
+ const std::vector<YAMLVFSEntry> &getMappings() const { return Mappings; }
+
void write(llvm::raw_ostream &OS);
};