[Reproducers] Make reproducer relocatable

Before this patch, reproducers weren't relocatable. The reproducer
contained hard coded paths in the VFS mapping, as well in the yaml file
listing the different input files for the command interpreter. This
patch changes that:

 - Use relative paths for the DataCollector.
 - Use an overlay prefix for the FileCollector.

Differential revision: https://reviews.llvm.org/D63467

llvm-svn: 363697
diff --git a/lldb/source/Utility/FileCollector.cpp b/lldb/source/Utility/FileCollector.cpp
index 1758ad8c..566355d 100644
--- a/lldb/source/Utility/FileCollector.cpp
+++ b/lldb/source/Utility/FileCollector.cpp
@@ -33,7 +33,8 @@
   return true;
 }
 
-FileCollector::FileCollector(const FileSpec &root) : m_root(root) {
+FileCollector::FileCollector(const FileSpec &root, const FileSpec &overlay_root)
+    : m_root(root), m_overlay_root(overlay_root) {
   sys::fs::create_directories(m_root.GetPath(), true);
 }
 
@@ -133,7 +134,9 @@
 std::error_code FileCollector::WriteMapping(const FileSpec &mapping_file) {
   std::lock_guard<std::mutex> lock(m_mutex);
 
-  const std::string root = m_root.GetPath();
+  llvm::StringRef root = m_overlay_root.GetPath();
+
+  m_vfs_writer.setOverlayDir(root);
   m_vfs_writer.setCaseSensitivity(IsCaseSensitivePath(root));
   m_vfs_writer.setUseExternalNames(false);