[cfe-commits] r173330 - in /cfe/trunk: lib/Serialization/GlobalModuleIndex.cpp test/Modules/global_index.m

NAKAMURA Takumi geek4civic at gmail.com
Thu Jan 24 00:20:11 PST 2013


Author: chapuni
Date: Thu Jan 24 02:20:11 2013
New Revision: 173330

URL: http://llvm.org/viewvc/llvm-project?rev=173330&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
    cfe/trunk/test/Modules/global_index.m

Modified: cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp?rev=173330&r1=173329&r2=173330&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp (original)
+++ cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp Thu Jan 24 02:20:11 2013
@@ -507,9 +507,7 @@
     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;
 

Modified: cfe/trunk/test/Modules/global_index.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/global_index.m?rev=173330&r1=173329&r2=173330&view=diff
==============================================================================
--- cfe/trunk/test/Modules/global_index.m (original)
+++ cfe/trunk/test/Modules/global_index.m Thu Jan 24 02:20:11 2013
@@ -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;





More information about the cfe-commits mailing list