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
 


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to