[PATCH] D129118: CommandLine: add and use cl::SubCommand::get{All,TopLevel}
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 5 02:15:04 PDT 2022
nhaehnle created this revision.
nhaehnle added reviewers: efriedma, lattner.
Herald added subscribers: ayermolo, hiraditya.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
nhaehnle requested review of this revision.
Herald added subscribers: cfe-commits, yota9.
Herald added projects: clang, LLVM.
Prefer using these accessors to access the special sub-commands
corresponding to the top-level (no subcommand) and all sub-commands.
This is a preparatory step towards removing the use of ManagedStatic:
with a subsequent change, these global instances will be moved to
be regular function-scope statics.
It is split up to give downstream projects a (albeit short) window in
which they can switch to using the accessors in a forward-compatible
way.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129118
Files:
bolt/lib/Utils/CommandLineOpts.cpp
bolt/tools/driver/llvm-bolt.cpp
clang/lib/Tooling/CommonOptionsParser.cpp
clang/tools/clang-refactor/ClangRefactor.cpp
llvm/include/llvm/Support/CommandLine.h
llvm/lib/Support/CommandLine.cpp
llvm/tools/llvm-xray/llvm-xray.cpp
llvm/unittests/Support/CommandLineInit/CommandLineInitTest.cpp
llvm/unittests/Support/CommandLineTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129118.442217.patch
Type: text/x-patch
Size: 19985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220705/304bbcb9/attachment.bin>
More information about the llvm-commits
mailing list