[llvm] 5c8462b - [Windows] Remove global OF_None flag for Windows in ToolOutputFiles
Abhina Sreeskantharajan via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 7 11:10:12 PDT 2021
Author: Abhina Sreeskantharajan
Date: 2021-04-07T14:10:04-04:00
New Revision: 5c8462b5daa2a17eadf5e9f6b976452369aa3a93
URL: https://github.com/llvm/llvm-project/commit/5c8462b5daa2a17eadf5e9f6b976452369aa3a93
DIFF: https://github.com/llvm/llvm-project/commit/5c8462b5daa2a17eadf5e9f6b976452369aa3a93.diff
LOG: [Windows] Remove global OF_None flag for Windows in ToolOutputFiles
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.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D100034
Added:
Modified:
llvm/lib/Support/ToolOutputFile.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/ToolOutputFile.cpp b/llvm/lib/Support/ToolOutputFile.cpp
index 3735aac79e2f4..c192ce60f31c9 100644
--- a/llvm/lib/Support/ToolOutputFile.cpp
+++ b/llvm/lib/Support/ToolOutputFile.cpp
@@ -46,12 +46,7 @@ ToolOutputFile::ToolOutputFile(StringRef Filename, std::error_code &EC,
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)
More information about the llvm-commits
mailing list