[PATCH] D99363: [Windows] Turn off text mode in TableGen and Rewriter to stop CRLF translation
Abhina Sree via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 25 12:27:19 PDT 2021
abhina.sreeskantharajan added inline comments.
================
Comment at: clang/lib/Frontend/Rewrite/FrontendActions.cpp:190
+ std::unique_ptr<raw_ostream> OS = CI.createDefaultOutputFile(
+ /*Binary=*/llvm::Triple(LLVM_HOST_TRIPLE).isOSWindows(),
+ getCurrentFileOrBufferName());
----------------
rnk wrote:
> In the long run, we really don't want this "is windows" check here in the caller. We really want a flag to push this logic down into the support library. Since we already know where we are going, I think these are the proper steps:
> - revert to green
> - add OF_TextWithCrLF, with the same behavior as OF_Text today
> - update all callers that used OF_Text before these System/Z patches to OF_TextWithCrlf (NFC)
> - make OF_Text skip CRLF conversion on Windows (check for breakage)
> - start relanding OF_Text changes for System/Z again
>
> Landing this patch as it is creates more code that we will have to edit and refactor later back to just OF_Text.
Yes, this sounds like a good plan. It doesn't seem like z/OS and Windows can share the same OF_Text flag as I originally thought. Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99363/new/
https://reviews.llvm.org/D99363
More information about the llvm-commits
mailing list