@@ -3161,15 +3161,15 @@ bool Target::IsSwiftCxxInteropEnabled() {
3161
3161
break ;
3162
3162
}
3163
3163
3164
- EnableSwiftCxxInterop interop_enabled = GetEnableSwiftCxxInterop ();
3164
+ AutoBool interop_enabled = GetEnableSwiftCxxInterop ();
3165
3165
switch (interop_enabled) {
3166
- case eEnableSwiftCxxInterop :
3166
+ case AutoBool::True :
3167
3167
m_is_swift_cxx_interop_enabled = eLazyBoolYes;
3168
3168
break ;
3169
- case eDisableSwiftCxxInterop :
3169
+ case AutoBool::False :
3170
3170
m_is_swift_cxx_interop_enabled = eLazyBoolNo;
3171
3171
break ;
3172
- case eAutoDetectSwiftCxxInterop : {
3172
+ case AutoBool::Auto : {
3173
3173
if (GetImages ().IsEmpty ())
3174
3174
m_is_swift_cxx_interop_enabled = eLazyBoolNo;
3175
3175
else
@@ -4694,10 +4694,21 @@ static constexpr OptionEnumValueElement g_memory_module_load_level_values[] = {
4694
4694
};
4695
4695
4696
4696
static constexpr OptionEnumValueElement g_enable_swift_cxx_interop_values[] = {
4697
- {eAutoDetectSwiftCxxInterop , " auto" ,
4697
+ {llvm::to_underlying (AutoBool::Auto) , " auto" ,
4698
4698
" Automatically detect if C++ interop mode should be enabled." },
4699
- {eEnableSwiftCxxInterop, " true" , " Enable C++ interop." },
4700
- {eDisableSwiftCxxInterop, " false" , " Disable C++ interop." },
4699
+ {llvm::to_underlying (AutoBool::True), " true" , " Enable C++ interop." },
4700
+ {llvm::to_underlying (AutoBool::False), " false" , " Disable C++ interop." },
4701
+ };
4702
+
4703
+ static constexpr OptionEnumValueElement g_enable_full_dwarf_debugging[] = {
4704
+ {llvm::to_underlying (AutoBool::Auto), " auto" ,
4705
+ " Automatically detect if full DWARF debugging should be enabled. Full "
4706
+ " DWARF debugging is enabled if no reflection metadata is added to the "
4707
+ " debugger." },
4708
+ {llvm::to_underlying (AutoBool::True), " true" ,
4709
+ " Enable full DWARF debugging." },
4710
+ {llvm::to_underlying (AutoBool::False), " false" ,
4711
+ " Disable full DWARF debugging." },
4701
4712
};
4702
4713
4703
4714
#define LLDB_PROPERTIES_target
@@ -4925,28 +4936,25 @@ bool TargetProperties::GetSwiftEnableBareSlashRegex() const {
4925
4936
return true ;
4926
4937
}
4927
4938
4928
- EnableSwiftCxxInterop TargetProperties::GetEnableSwiftCxxInterop () const {
4939
+ AutoBool TargetProperties::GetEnableSwiftCxxInterop () const {
4929
4940
const uint32_t idx = ePropertySwiftEnableCxxInterop;
4930
4941
4931
- EnableSwiftCxxInterop enable_interop =
4932
- (EnableSwiftCxxInterop )m_experimental_properties_up->GetValueProperties ()
4933
- ->GetPropertyAtIndexAs <EnableSwiftCxxInterop >(idx)
4934
- .value_or (static_cast <EnableSwiftCxxInterop >(
4942
+ AutoBool enable_interop =
4943
+ (AutoBool )m_experimental_properties_up->GetValueProperties ()
4944
+ ->GetPropertyAtIndexAs <AutoBool >(idx)
4945
+ .value_or (static_cast <AutoBool >(
4935
4946
g_target_properties[idx].default_uint_value ));
4936
4947
return enable_interop;
4937
4948
}
4938
4949
4939
- bool TargetProperties::GetSwiftEnableFullDwarfDebugging () const {
4940
- const Property *exp_property =
4941
- m_collection_sp->GetPropertyAtIndex (ePropertyExperimental);
4942
- OptionValueProperties *exp_values =
4943
- exp_property->GetValue ()->GetAsProperties ();
4944
- if (exp_values)
4945
- return exp_values
4946
- ->GetPropertyAtIndexAs <bool >(ePropertySwiftEnableFullDwarfDebugging)
4947
- .value_or (false );
4948
-
4949
- return false ;
4950
+ AutoBool TargetProperties::GetSwiftEnableFullDwarfDebugging () const {
4951
+ const uint32_t idx = ePropertySwiftEnableCxxInterop;
4952
+ AutoBool enable_dwarf_debugging =
4953
+ (AutoBool)m_experimental_properties_up->GetValueProperties ()
4954
+ ->GetPropertyAtIndexAs <AutoBool>(idx)
4955
+ .value_or (static_cast <AutoBool>(
4956
+ g_target_properties[idx].default_uint_value ));
4957
+ return enable_dwarf_debugging;
4950
4958
}
4951
4959
4952
4960
bool TargetProperties::GetSwiftAllowExplicitModules () const {
0 commit comments