diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | bfef399519ca9b8a4b4c6b563253bad7e0eeffe0 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /lib/Serialization/GlobalModuleIndex.cpp | |
parent | 6a0372513edbc473b538d2f724efac50405d6fef (diff) |
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 b6693e40e51e..fb647b0be9bc 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. |