]> granicus.if.org Git - clang/commitdiff
Don't use PathV1.h in CIndexCodeCompletion.cpp.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 26 Jun 2013 12:54:23 +0000 (12:54 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 26 Jun 2013 12:54:23 +0000 (12:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184940 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndexCodeCompletion.cpp

index 58dc02187038bdef1f52e55445e5c7d896324fc0..8face6580ac97779584fc7e1476a3d6b20fec79e 100644 (file)
@@ -31,8 +31,8 @@
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/Atomic.h"
 #include "llvm/Support/CrashRecoveryContext.h"
+#include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/PathV1.h"
 #include "llvm/Support/Program.h"
 #include "llvm/Support/Timer.h"
 #include "llvm/Support/raw_ostream.h"
@@ -272,7 +272,7 @@ struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults {
   
   /// \brief Temporary files that should be removed once we have finished
   /// with the code-completion results.
-  std::vector<llvm::sys::Path> TemporaryFiles;
+  std::vector<std::string> TemporaryFiles;
 
   /// \brief Temporary buffers that will be deleted once we have finished with
   /// the code-completion results.
@@ -341,7 +341,7 @@ AllocatedCXCodeCompleteResults::~AllocatedCXCodeCompleteResults() {
   delete [] Results;
 
   for (unsigned I = 0, N = TemporaryFiles.size(); I != N; ++I)
-    TemporaryFiles[I].eraseFromDisk();
+    llvm::sys::fs::remove(TemporaryFiles[I]);
   for (unsigned I = 0, N = TemporaryBuffers.size(); I != N; ++I)
     delete TemporaryBuffers[I];