From 7a16862745773a258225c0249fb10bd6e306b572 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 15 Jan 2019 22:36:56 +0000 Subject: [PATCH] [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-svn: 351266 --- 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 4cc729e..61c3d2f 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); }; -- 2.7.4