[PATCH] D147710: Add an option to print out annotation remark count.
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 09:14:52 PDT 2023
thegameg added inline comments.
================
Comment at: llvm/tools/llvm-remarkutil/RemarkUtil.cpp:87
+static cl::opt<std::string>
+ RemarkToCollect("remark", cl::desc("remark to collect count for"),
+ cl::sub(subopts::AnnotationCount));
----------------
I think `--remark` is too vague. It is very specific to the type of the annotation remark, so maybe `--annotation-type`?
================
Comment at: llvm/tools/llvm-remarkutil/RemarkUtil.cpp:302
+ Remark.Args, [](const Argument &Arg) { return Arg.Key == "count"; });
+ assert(RemarkNameArg != Remark.Args.end() &&
+ "Cannot find remark with the given name");
----------------
Why assert? The `type` can be anything right? If it doesn't match `--remark` it should just print nothing, no?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147710/new/
https://reviews.llvm.org/D147710
More information about the llvm-commits
mailing list