From 0263747edc9ec15228fa5d1ed55ebc626ccc244c Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 15 Jan 2019 22:36:56 +0000 Subject: [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. --- llvm/include/llvm/Support/VirtualFileSystem.h | 2 ++ 1 file changed, 2 insertions(+) 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 &getMappings() const { return Mappings; } + void write(llvm::raw_ostream &OS); }; -- cgit v1.2.3