aboutsummaryrefslogtreecommitdiff
path: root/source/Plugins/StructuredData
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-07-29 16:41:30 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-07-29 16:41:30 +0000
commita0e6dfdfbdf4a7480b4aa9ff4e8825ee8261acd2 (patch)
treeb9f0b4bb9a477669c752d2423bde981410056780 /source/Plugins/StructuredData
parent87cce0fddd51b22296bb6db4f9226372b007745a (diff)
downloadlldb-a0e6dfdfbdf4a7480b4aa9ff4e8825ee8261acd2.tar.gz
[lldb] Also include the array definition in Properties.inc
Right now our Properties.inc only generates the initializer for the options list but not the array declaration boilerplate around it. As the array definition is identical for all arrays, we might as well also let the Properties.inc generate it alongside the initializers. Unfortunately we cannot do the same for enums, as there's this magic ePropertyExperimental, which needs to come at the end to be interpreted correctly. Hopefully we can get rid of this in the future and do the same for the property enums. Differential revision: https://reviews.llvm.org/D65353 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@367238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Plugins/StructuredData')
-rw-r--r--source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
index 0438fde77..b05c38993 100644
--- a/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
+++ b/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
@@ -104,10 +104,8 @@ void SetGlobalEnableOptions(const DebuggerSP &debugger_sp,
/// Code to handle the StructuredDataDarwinLog settings
-static constexpr PropertyDefinition g_properties[] = {
#define LLDB_PROPERTIES_darwinlog
#include "Properties.inc"
-};
enum {
#define LLDB_PROPERTIES_darwinlog
@@ -123,7 +121,7 @@ public:
StructuredDataDarwinLogProperties() : Properties() {
m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
- m_collection_sp->Initialize(g_properties);
+ m_collection_sp->Initialize(g_darwinlog_properties);
}
~StructuredDataDarwinLogProperties() override {}
@@ -131,13 +129,13 @@ public:
bool GetEnableOnStartup() const {
const uint32_t idx = ePropertyEnableOnStartup;
return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_properties[idx].default_uint_value != 0);
+ nullptr, idx, g_darwinlog_properties[idx].default_uint_value != 0);
}
llvm::StringRef GetAutoEnableOptions() const {
const uint32_t idx = ePropertyAutoEnableOptions;
return m_collection_sp->GetPropertyAtIndexAsString(
- nullptr, idx, g_properties[idx].default_cstr_value);
+ nullptr, idx, g_darwinlog_properties[idx].default_cstr_value);
}
const char *GetLoggingModuleName() const { return "libsystem_trace.dylib"; }