forked from OSchip/llvm-project
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
This commit is contained in:
parent
8a4a16618f
commit
e00c986897
|
@ -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;
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -generate-module-index -F %S/Inputs %s -verify
|
||||
// RUN: ls %t|grep modules.idx
|
||||
// REQUIRES: shell
|
||||
// XFAIL: mingw32
|
||||
|
||||
// expected-no-diagnostics
|
||||
@import DependsOnModule;
|
||||
|
|
Loading…
Reference in New Issue