Extend clang_createTranslationUnitFromSourceFile() to support creating
translation units that include unsaved files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94258 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/CIndex/CIndexer.h b/tools/CIndex/CIndexer.h
index 1a4e4b7..d01454f 100644
--- a/tools/CIndex/CIndexer.h
+++ b/tools/CIndex/CIndexer.h
@@ -19,6 +19,7 @@
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/ASTUnit.h"
 #include "llvm/System/Path.h"
+#include <vector>
 
 using namespace clang;
 
@@ -77,4 +78,17 @@
   static CXString createCXString(const char *String, bool DupString = false);
 };
 
+namespace clang {
+  /**
+   * \brief Given a set of "unsaved" files, create temporary files and 
+   * construct the clang -cc1 argument list needed to perform the remapping.
+   *
+   * \returns true if an error occurred.
+   */
+  bool RemapFiles(unsigned num_unsaved_files,
+                  struct CXUnsavedFile *unsaved_files,
+                  std::vector<std::string> &RemapArgs,
+                  std::vector<llvm::sys::Path> &TemporaryFiles);
+}
+
 #endif