[PATCH] D73982: [yaml2obj] Refactor command line parsing
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 09:36:48 PST 2020
MaskRay added inline comments.
================
Comment at: llvm/tools/yaml2obj/yaml2obj.cpp:31
-static cl::opt<std::string>
- Input(cl::Positional, cl::desc("<input>"), cl::init("-"));
+namespace {
+cl::OptionCategory Cat("yaml2obj Options");
----------------
jhenderson wrote:
> I thought using `static` was more in keeping with LLVM-style?
LLVM style prefers `static`.
However, namespaces are used in other places, e.g. llvm-nm. llvm-readobj interestingly uses a named namespace.
`static` makes the code a bit more verbose but I can change you are strong about this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73982/new/
https://reviews.llvm.org/D73982
More information about the llvm-commits
mailing list