[Lldb-commits] [lldb] caa7135 - Fix lldb option handling since e953ae5bbc313fd0cc980ce021d487e5b5199ea4
via lldb-commits
lldb-commits at lists.llvm.org
Sat Dec 24 03:17:49 PST 2022
Author: serge-sans-paille
Date: 2022-12-24T12:17:18+01:00
New Revision: caa713559bd38f337d7d35de35686775e8fb5175
URL: https://github.com/llvm/llvm-project/commit/caa713559bd38f337d7d35de35686775e8fb5175
DIFF: https://github.com/llvm/llvm-project/commit/caa713559bd38f337d7d35de35686775e8fb5175.diff
LOG: Fix lldb option handling since e953ae5bbc313fd0cc980ce021d487e5b5199ea4
Option tables are no longer null-terminated.
This is a follow-up to https://reviews.llvm.org/D139881
Added:
Modified:
lldb/tools/driver/Driver.cpp
Removed:
################################################################################
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp
index 76b0d7bf60a56..c61df7d62f080 100644
--- a/lldb/tools/driver/Driver.cpp
+++ b/lldb/tools/driver/Driver.cpp
@@ -59,7 +59,10 @@ enum ID {
#undef OPTION
};
-#define PREFIX(NAME, VALUE) constexpr llvm::StringLiteral NAME[] = VALUE;
+#define PREFIX(NAME, VALUE) \
+ static constexpr StringLiteral NAME##_init[] = VALUE; \
+ static constexpr ArrayRef<StringLiteral> NAME(NAME##_init, \
+ std::size(NAME##_init) - 1);
#include "Options.inc"
#undef PREFIX
More information about the lldb-commits
mailing list