diff options
Diffstat (limited to 'llvm/tools/llvm-strings/llvm-strings.cpp')
-rw-r--r-- | llvm/tools/llvm-strings/llvm-strings.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/llvm-strings/llvm-strings.cpp b/llvm/tools/llvm-strings/llvm-strings.cpp index 918ca5f..69a3b12 100644 --- a/llvm/tools/llvm-strings/llvm-strings.cpp +++ b/llvm/tools/llvm-strings/llvm-strings.cpp @@ -39,7 +39,10 @@ enum ID { #undef OPTION }; -#define PREFIX(NAME, VALUE) const char *const 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 "Opts.inc" #undef PREFIX |