mirror of
https://github.com/intel/llvm.git
synced 2026-02-08 08:57:43 +08:00
[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
This commit is contained in:
@@ -65,10 +65,8 @@ using namespace lldb_private;
|
||||
|
||||
namespace {
|
||||
|
||||
static constexpr PropertyDefinition g_properties[] = {
|
||||
#define LLDB_PROPERTIES_modulelist
|
||||
#include "Properties.inc"
|
||||
};
|
||||
|
||||
enum {
|
||||
#define LLDB_PROPERTIES_modulelist
|
||||
@@ -80,7 +78,7 @@ enum {
|
||||
ModuleListProperties::ModuleListProperties() {
|
||||
m_collection_sp =
|
||||
std::make_shared<OptionValueProperties>(ConstString("symbols"));
|
||||
m_collection_sp->Initialize(g_properties);
|
||||
m_collection_sp->Initialize(g_modulelist_properties);
|
||||
|
||||
llvm::SmallString<128> path;
|
||||
clang::driver::Driver::getDefaultModuleCachePath(path);
|
||||
@@ -90,7 +88,7 @@ ModuleListProperties::ModuleListProperties() {
|
||||
bool ModuleListProperties::GetEnableExternalLookup() const {
|
||||
const uint32_t idx = ePropertyEnableExternalLookup;
|
||||
return m_collection_sp->GetPropertyAtIndexAsBoolean(
|
||||
nullptr, idx, g_properties[idx].default_uint_value != 0);
|
||||
nullptr, idx, g_modulelist_properties[idx].default_uint_value != 0);
|
||||
}
|
||||
|
||||
bool ModuleListProperties::SetEnableExternalLookup(bool new_value) {
|
||||
|
||||
Reference in New Issue
Block a user