[PATCH] D100872: Use OpenFlags instead of boolean to set a file as text/binary
Abhina Sree via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 21 05:26:15 PDT 2021
abhina.sreeskantharajan added inline comments.
================
Comment at: clang/include/clang/Frontend/CompilerInstance.h:738-740
+ createOutputFileImpl(StringRef OutputPath, llvm::sys::fs::OpenFlags Flags,
bool RemoveFileOnSignal, bool UseTemporary,
bool CreateMissingDirectories);
----------------
rnk wrote:
> I think this is only going to be worth it if we can roll up all of these booleans into a new flags enum for compiler instance. It also prevents introducing a new use of FileSystem.h, which is an expensive header to include.
Sorry, I don't think I completely understand your suggestion. Are you proposing that we create a new enum just for CompilerInstance.h for the other booleans like RemoveFileOnSignal, UseTemporary, CreateMissingDirectories? And this new enum also contain text/binary flags so we don't need to use the enum in FileSystem.h?
For background, I need this specific change to set some more text files with OF_Text because my old commit got reverted since it caused CRLF issues on Windows https://reviews.llvm.org/D96363.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100872/new/
https://reviews.llvm.org/D100872
More information about the cfe-commits
mailing list