aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/ToolOutputFile.cpp
diff options
context:
space:
mode:
authorAbhina Sreeskantharajan <Abhina.Sreeskantharajan@ibm.com>2021-04-07 14:09:21 -0400
committerAbhina Sreeskantharajan <Abhina.Sreeskantharajan@ibm.com>2021-04-07 14:10:04 -0400
commit5c8462b5daa2a17eadf5e9f6b976452369aa3a93 (patch)
tree7493c70f47b3ee22064e204c95a08799bb98150e /llvm/lib/Support/ToolOutputFile.cpp
parent028092eb613e5553ce0833878e7d36fcaf11fcb2 (diff)
downloadllvm-5c8462b5daa2a17eadf5e9f6b976452369aa3a93.zip
llvm-5c8462b5daa2a17eadf5e9f6b976452369aa3a93.tar.gz
llvm-5c8462b5daa2a17eadf5e9f6b976452369aa3a93.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Support/ToolOutputFile.cpp')
-rw-r--r--llvm/lib/Support/ToolOutputFile.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Support/ToolOutputFile.cpp b/llvm/lib/Support/ToolOutputFile.cpp
index 3735aac..c192ce6 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)