aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-01-24 08:20:11 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-01-24 08:20:11 +0000
commitd2db16f59601bc028f4f973990cc6d4abe95b91a (patch)
treec0830af0c4a539a1394f7cda0f01246598f97afa /lib/Serialization
parent35ae83278d04d7d7ab5bb2c82d4323a4a05f52de (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization')
-rw-r--r--lib/Serialization/GlobalModuleIndex.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp
index 3b60979e75..1600e357dd 100644
--- a/lib/Serialization/GlobalModuleIndex.cpp
+++ b/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;