[llvm] New tool 'llvm-elf2bin'. (NOT READY FOR REVIEW – NO TESTS) (PR #73625)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 08:18:16 PST 2023
================
@@ -0,0 +1,63 @@
+//===- Opts.td - llvm-elf2bin's command-line option definitions -----------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+include "llvm/Option/OptParser.td"
+
+multiclass Value<string longname, string shortname, string metavar,
+ string help, OptionGroup group> {
+ def NAME # _EQ : Joined<["--"], longname # "=">,
+ HelpText<help>,
+ MetaVarName<metavar>,
+ Group<group>;
+ def : Separate<["--"], longname>,
+ Alias<!cast<Joined>(NAME # "_EQ")>;
+
+ if !not(!empty(shortname)) then {
----------------
MaskRay wrote:
For new utilities, we prefer supporting only `--foo x`/`--foo=x` and not `-foo x`. `--` appears to the majority for modern programs. For this new utility we don't even have compatibility goal for supporting `-foo`.
https://github.com/llvm/llvm-project/pull/73625
More information about the llvm-commits
mailing list