diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-24 08:20:11 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-24 08:20:11 +0000 |
commit | e00c986897ea6e52e1119adecee361433eed13e7 (patch) | |
tree | ad0c00bb2a2c0957d53cb05513e98ad021ee611d /clang/lib/Serialization/GlobalModuleIndex.cpp | |
parent | 8a4a16618f7f859b7302bd1469151487dbc6c012 (diff) | |
download | llvm-e00c986897ea6e52e1119adecee361433eed13e7.zip llvm-e00c986897ea6e52e1119adecee361433eed13e7.tar.gz llvm-e00c986897ea6e52e1119adecee361433eed13e7.tar.bz2 |
clang/GlobalModuleIndex: Don't open the same file twice. Use raw_fd_ostream(fd, ...) instead.
FIXME: PathV2::unique_file() is assumed to open the file with binary mode on win32.
llvm-svn: 173330
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r-- | clang/lib/Serialization/GlobalModuleIndex.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp index 3b60979..1600e35 100644 --- a/clang/lib/Serialization/GlobalModuleIndex.cpp +++ b/clang/lib/Serialization/GlobalModuleIndex.cpp @@ -507,9 +507,7 @@ GlobalModuleIndex::writeIndex(FileManager &FileMgr, StringRef Path) { return EC_IOError; // Open the temporary global index file for output. - std::string ErrorInfo; - llvm::raw_fd_ostream Out(IndexTmpPath.c_str(), ErrorInfo, - llvm::raw_fd_ostream::F_Binary); + llvm::raw_fd_ostream Out(TmpFD, true); if (Out.has_error()) return EC_IOError; |