Skip to content

Commit

Permalink
Fix lldb option handling since e953ae5
Browse files Browse the repository at this point in the history
Option tables are no longer null-terminated.

This is a follow-up to https://reviews.llvm.org/D139881
  • Loading branch information
serge-sans-paille committed Dec 24, 2022
1 parent e953ae5 commit caa7135
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lldb/tools/driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit caa7135

Please sign in to comment.