diff options
Diffstat (limited to 'lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r-- | lib/Serialization/GlobalModuleIndex.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp index b6693e4..fb647b0 100644 --- a/lib/Serialization/GlobalModuleIndex.cpp +++ b/lib/Serialization/GlobalModuleIndex.cpp @@ -26,7 +26,7 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/LockFileManager.h" #include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/PathV2.h" +#include "llvm/Support/Path.h" #include <cstdio> using namespace clang; using namespace serialization; @@ -229,7 +229,8 @@ GlobalModuleIndex::readIndex(StringRef Path) { llvm::sys::path::append(IndexPath, IndexFileName); llvm::OwningPtr<llvm::MemoryBuffer> Buffer; - if (llvm::MemoryBuffer::getFile(IndexPath, Buffer) != llvm::errc::success) + if (llvm::MemoryBuffer::getFile(IndexPath.c_str(), Buffer) != + llvm::errc::success) return std::make_pair((GlobalModuleIndex *)0, EC_NotFound); /// \brief The bitstream reader from which we'll read the AST file. @@ -790,7 +791,8 @@ GlobalModuleIndex::writeIndex(FileManager &FileMgr, StringRef Path) { // Write the global index file to a temporary file. llvm::SmallString<128> IndexTmpPath; int TmpFD; - if (llvm::sys::fs::unique_file(IndexPath + "-%%%%%%%%", TmpFD, IndexTmpPath)) + if (llvm::sys::fs::createUniqueFile(IndexPath + "-%%%%%%%%", TmpFD, + IndexTmpPath)) return EC_IOError; // Open the temporary global index file for output. |