aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-rc
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2022-12-25 22:54:27 -0800
committerVitaly Buka <vitalybuka@google.com>2022-12-25 23:12:47 -0800
commitaa171833ab0017d9732e82b8682c9848ab25ff9e (patch)
tree7c7787d45628615c0637ff4954d5ebd1e6f60945 /llvm/tools/llvm-rc
parent904a79f99153d9d8ed67beeed82a0f910bb000fd (diff)
downloadllvm-aa171833ab0017d9732e82b8682c9848ab25ff9e.zip
llvm-aa171833ab0017d9732e82b8682c9848ab25ff9e.tar.gz
llvm-aa171833ab0017d9732e82b8682c9848ab25ff9e.tar.bz2
Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information"
Revert "Fix lldb option handling since e953ae5bbc313fd0cc980ce021d487e5b5199ea4 (part 2)" Revert "Fix lldb option handling since e953ae5bbc313fd0cc980ce021d487e5b5199ea4" GCC build hangs on this bot https://lab.llvm.org/buildbot/#/builders/37/builds/19104 compiling CMakeFiles/obj.clangBasic.dir/Targets/AArch64.cpp.d The bot uses GNU 11.3.0, but I can reproduce locally with gcc (Debian 12.2.0-3) 12.2.0. This reverts commit caa713559bd38f337d7d35de35686775e8fb5175. This reverts commit 06b90e2e9c991e211fecc97948e533320a825470. This reverts commit e953ae5bbc313fd0cc980ce021d487e5b5199ea4.
Diffstat (limited to 'llvm/tools/llvm-rc')
-rw-r--r--llvm/tools/llvm-rc/llvm-rc.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/llvm/tools/llvm-rc/llvm-rc.cpp b/llvm/tools/llvm-rc/llvm-rc.cpp
index f7f9ce2..00fb9c1 100644
--- a/llvm/tools/llvm-rc/llvm-rc.cpp
+++ b/llvm/tools/llvm-rc/llvm-rc.cpp
@@ -55,11 +55,7 @@ enum ID {
#undef OPTION
};
-namespace rc_opt {
-#define PREFIX(NAME, VALUE) \
- static constexpr StringLiteral NAME##_init[] = VALUE; \
- static constexpr ArrayRef<StringLiteral> NAME(NAME##_init, \
- std::size(NAME##_init) - 1);
+#define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
#include "Opts.inc"
#undef PREFIX
@@ -74,11 +70,10 @@ static constexpr opt::OptTable::Info InfoTable[] = {
#include "Opts.inc"
#undef OPTION
};
-} // namespace rc_opt
class RcOptTable : public opt::OptTable {
public:
- RcOptTable() : OptTable(rc_opt::InfoTable, /* IgnoreCase = */ true) {}
+ RcOptTable() : OptTable(InfoTable, /* IgnoreCase = */ true) {}
};
enum Windres_ID {
@@ -90,30 +85,25 @@ enum Windres_ID {
#undef OPTION
};
-namespace windres_opt {
-#define PREFIX(NAME, VALUE) \
- static constexpr StringLiteral NAME##_init[] = VALUE; \
- static constexpr ArrayRef<StringLiteral> NAME(NAME##_init, \
- std::size(NAME##_init) - 1);
+#define PREFIX(NAME, VALUE) const char *const WINDRES_##NAME[] = VALUE;
#include "WindresOpts.inc"
#undef PREFIX
-static constexpr opt::OptTable::Info InfoTable[] = {
+static constexpr opt::OptTable::Info WindresInfoTable[] = {
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
HELPTEXT, METAVAR, VALUES) \
- {PREFIX, NAME, HELPTEXT, \
- METAVAR, WINDRES_##ID, opt::Option::KIND##Class, \
- PARAM, FLAGS, WINDRES_##GROUP, \
- WINDRES_##ALIAS, ALIASARGS, VALUES},
+ { \
+ WINDRES_##PREFIX, NAME, HELPTEXT, \
+ METAVAR, WINDRES_##ID, opt::Option::KIND##Class, \
+ PARAM, FLAGS, WINDRES_##GROUP, \
+ WINDRES_##ALIAS, ALIASARGS, VALUES},
#include "WindresOpts.inc"
#undef OPTION
};
-} // namespace windres_opt
class WindresOptTable : public opt::OptTable {
public:
- WindresOptTable()
- : OptTable(windres_opt::InfoTable, /* IgnoreCase = */ false) {}
+ WindresOptTable() : OptTable(WindresInfoTable, /* IgnoreCase = */ false) {}
};
static ExitOnError ExitOnErr;