Author: chapuni Date: Thu Aug 3 23:35:32 2017 New Revision: 310030 URL: http://llvm.org/viewvc/llvm-project?rev=310030&view=rev Log: Revert r309984, "Use "foo-12345.o" instead of "foo.o-12345" as temporary file name."
It generates MODULE-XXXXXXXXXXXX-%%%%%%%%.pcm, then GlobalModuleIndex.cpp is confused with the suffix ".pcm" Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=310030&r1=310029&r2=310030&view=diff ============================================================================== --- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original) +++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Thu Aug 3 23:35:32 2017 @@ -759,13 +759,9 @@ std::unique_ptr<llvm::raw_pwrite_stream> if (UseTemporary) { // Create a temporary file. - // Insert -%%%%%%%% before the extension (if any), so that tools doing - // things based on the file extension do the right thing. - StringRef OutputExtension = llvm::sys::path::extension(OutFile); - SmallString<128> TempPath = - StringRef(OutFile).drop_back(OutputExtension.size()); + SmallString<128> TempPath; + TempPath = OutFile; TempPath += "-%%%%%%%%"; - TempPath += OutputExtension; int fd; std::error_code EC = llvm::sys::fs::createUniqueFile(TempPath, fd, TempPath); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits