summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
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
commita8ea595509f33834091fb9e3234a373f83d709a8 (patch)
tree083004a39520082ad3caba6186c23d41ffb4ee6a /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parentcc0bc941d4ebd0275fe206d78f395822258e73bc (diff)
downloadbcm5719-llvm-a8ea595509f33834091fb9e3234a373f83d709a8.tar.gz
bcm5719-llvm-a8ea595509f33834091fb9e3234a373f83d709a8.zip
[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 llvm-svn: 367238
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 0d55e341dae..b6a98bcc5cd 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -72,10 +72,8 @@ static constexpr OptionEnumValueElement g_kaslr_kernel_scan_enum_values[] = {
"Scan through the entire potential address range of Darwin kernel (only "
"on 32-bit targets)."}};
-static constexpr PropertyDefinition g_properties[] = {
#define LLDB_PROPERTIES_dynamicloaderdarwinkernel
#include "Properties.inc"
-};
enum {
#define LLDB_PROPERTIES_dynamicloaderdarwinkernel
@@ -91,7 +89,7 @@ public:
DynamicLoaderDarwinKernelProperties() : Properties() {
m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
- m_collection_sp->Initialize(g_properties);
+ m_collection_sp->Initialize(g_dynamicloaderdarwinkernel_properties);
}
~DynamicLoaderDarwinKernelProperties() override {}
@@ -99,13 +97,15 @@ public:
bool GetLoadKexts() const {
const uint32_t idx = ePropertyLoadKexts;
return m_collection_sp->GetPropertyAtIndexAsBoolean(
- nullptr, idx, g_properties[idx].default_uint_value != 0);
+ nullptr, idx,
+ g_dynamicloaderdarwinkernel_properties[idx].default_uint_value != 0);
}
KASLRScanType GetScanType() const {
const uint32_t idx = ePropertyScanType;
return (KASLRScanType)m_collection_sp->GetPropertyAtIndexAsEnumeration(
- nullptr, idx, g_properties[idx].default_uint_value);
+ nullptr, idx,
+ g_dynamicloaderdarwinkernel_properties[idx].default_uint_value);
}
};
OpenPOWER on IntegriCloud