[PATCH] D150990: [split-file] Add flags to support comments and adding extension to output files
Aaron Ballman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 14:26:08 PDT 2023
aaron.ballman added a comment.
Should this also update https://llvm.org/docs/TestingGuide.html#extra-files so we have some public documentation for the functionality?
================
Comment at: llvm/utils/split-file/split-file.cpp:47
+static cl::opt<std::string> addFileExtension("add-file-extension",
+ cl::desc("Add extension to output file names"),
+ cl::value_desc("ext"),
----------------
================
Comment at: llvm/utils/split-file/split-file.cpp:52
+static cl::opt<bool> allowComments("allow-comments",
+ cl::desc("Allow comments to be introduced with a colon after part name"),
+ cl::cat(cat));
----------------
================
Comment at: llvm/utils/split-file/split-file.cpp:138-139
sys::path::append(partPath, output, keyValue.first);
+ if (!addFileExtension.empty()) {
+ partPath.append(".");
+ partPath.append(addFileExtension.getValue());
----------------
Should we be kind and look at `addFileExtension.getValue()[0]` to see if it's `.` already? e.g., the user does: `--add-file-extension=.cpp`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150990/new/
https://reviews.llvm.org/D150990
More information about the llvm-commits
mailing list