[PATCH] D100034: [Windows] Remove global OF_None flag for Windows in ToolOutputFiles
Abhina Sree via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 7 06:47:54 PDT 2021
abhina.sreeskantharajan created this revision.
Herald added subscribers: dexonsmith, hiraditya.
abhina.sreeskantharajan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Since we have created a new OF_TextWithCRLF flag, we no longer need to worry about OF_Text flag turning on CRLF translation. I can remove this workaround I added to globally open all ToolOutputFiles as binary on Windows.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D100034
Files:
llvm/lib/Support/ToolOutputFile.cpp
Index: llvm/lib/Support/ToolOutputFile.cpp
===================================================================
--- llvm/lib/Support/ToolOutputFile.cpp
+++ llvm/lib/Support/ToolOutputFile.cpp
@@ -46,12 +46,7 @@
EC = std::error_code();
return;
}
-
- // On Windows, we set the OF_None flag even for text files to avoid
- // CRLF translation.
- OSHolder.emplace(
- Filename, EC,
- llvm::Triple(LLVM_HOST_TRIPLE).isOSWindows() ? sys::fs::OF_None : Flags);
+ OSHolder.emplace(Filename, EC, Flags);
OS = OSHolder.getPointer();
// If open fails, no cleanup is needed.
if (EC)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100034.335799.patch
Type: text/x-patch
Size: 604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210407/5dafae7c/attachment.bin>
More information about the llvm-commits
mailing list