diff options
author | serge-sans-paille <sguelton@mozilla.com> | 2022-12-23 11:36:56 +0100 |
---|---|---|
committer | serge-sans-paille <sguelton@mozilla.com> | 2022-12-23 11:36:56 +0100 |
commit | b7065a31b5e7e0bbdae1cbb6cd06fcfe05b7758f (patch) | |
tree | 9059fcc00424d7b8bbdf317a777620d0fee08e8c /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 719d98dfa841c522d8d452f0685e503538415a53 (diff) | |
download | llvm-b7065a31b5e7e0bbdae1cbb6cd06fcfe05b7758f.zip llvm-b7065a31b5e7e0bbdae1cbb6cd06fcfe05b7758f.tar.gz llvm-b7065a31b5e7e0bbdae1cbb6cd06fcfe05b7758f.tar.bz2 |
Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information"
Failing builds: https://lab.llvm.org/buildbot#builders/9/builds/19030
This is GCC specific and has been reported upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108158
This reverts commit 719d98dfa841c522d8d452f0685e503538415a53.
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 5cd6acb..bb02cd0 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -119,29 +119,28 @@ private: }; // ObjdumpOptID is in ObjdumpOptID.h -namespace objdump_opt { -#define PREFIX(NAME, VALUE) \ - static constexpr std::initializer_list<StringLiteral> NAME = VALUE; + +#define PREFIX(NAME, VALUE) const char *const OBJDUMP_##NAME[] = VALUE; #include "ObjdumpOpts.inc" #undef PREFIX -static constexpr std::initializer_list<opt::OptTable::Info> ObjdumpInfoTable = { +static constexpr opt::OptTable::Info ObjdumpInfoTable[] = { +#define OBJDUMP_nullptr nullptr #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ HELPTEXT, METAVAR, VALUES) \ - {PREFIX, NAME, HELPTEXT, \ - METAVAR, OBJDUMP_##ID, opt::Option::KIND##Class, \ - PARAM, FLAGS, OBJDUMP_##GROUP, \ - OBJDUMP_##ALIAS, ALIASARGS, VALUES}, + {OBJDUMP_##PREFIX, NAME, HELPTEXT, \ + METAVAR, OBJDUMP_##ID, opt::Option::KIND##Class, \ + PARAM, FLAGS, OBJDUMP_##GROUP, \ + OBJDUMP_##ALIAS, ALIASARGS, VALUES}, #include "ObjdumpOpts.inc" #undef OPTION +#undef OBJDUMP_nullptr }; -} // namespace objdump_opt class ObjdumpOptTable : public CommonOptTable { public: ObjdumpOptTable() - : CommonOptTable(objdump_opt::ObjdumpInfoTable, - " [options] <input object files>", + : CommonOptTable(ObjdumpInfoTable, " [options] <input object files>", "llvm object file dumper") {} }; @@ -154,28 +153,27 @@ enum OtoolOptID { #undef OPTION }; -namespace otool { -#define PREFIX(NAME, VALUE) \ - constexpr std::initializer_list<StringLiteral> NAME = VALUE; +#define PREFIX(NAME, VALUE) const char *const OTOOL_##NAME[] = VALUE; #include "OtoolOpts.inc" #undef PREFIX -static constexpr std::initializer_list<opt::OptTable::Info> OtoolInfoTable = { +static constexpr opt::OptTable::Info OtoolInfoTable[] = { +#define OTOOL_nullptr nullptr #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ HELPTEXT, METAVAR, VALUES) \ - {PREFIX, NAME, HELPTEXT, \ - METAVAR, OTOOL_##ID, opt::Option::KIND##Class, \ - PARAM, FLAGS, OTOOL_##GROUP, \ - OTOOL_##ALIAS, ALIASARGS, VALUES}, + {OTOOL_##PREFIX, NAME, HELPTEXT, \ + METAVAR, OTOOL_##ID, opt::Option::KIND##Class, \ + PARAM, FLAGS, OTOOL_##GROUP, \ + OTOOL_##ALIAS, ALIASARGS, VALUES}, #include "OtoolOpts.inc" #undef OPTION +#undef OTOOL_nullptr }; -} // namespace otool class OtoolOptTable : public CommonOptTable { public: OtoolOptTable() - : CommonOptTable(otool::OtoolInfoTable, " [option...] [file...]", + : CommonOptTable(OtoolInfoTable, " [option...] [file...]", "Mach-O object file displaying tool") {} }; |