[lldb] Eliminate {Get,Set}PropertyAtIndexAsFileSpec (NFC)

This patch is a continuation of 6f8b33f6df and eliminates the
{Get,Set}PropertyAtIndexAsFileSpec functions.
This commit is contained in:
Jonas Devlieghere
2023-05-04 22:07:37 -07:00
parent 3145e60caf
commit ab73a9c1a7
11 changed files with 30 additions and 58 deletions

View File

@@ -112,25 +112,23 @@ bool ModuleListProperties::GetEnableBackgroundLookup() const {
}
FileSpec ModuleListProperties::GetClangModulesCachePath() const {
return m_collection_sp
->GetPropertyAtIndexAsOptionValueFileSpec(ePropertyClangModulesCachePath)
->GetCurrentValue();
const uint32_t idx = ePropertyClangModulesCachePath;
return GetPropertyAtIndexAs<FileSpec>(idx, {});
}
bool ModuleListProperties::SetClangModulesCachePath(const FileSpec &path) {
return m_collection_sp->SetPropertyAtIndexAsFileSpec(
ePropertyClangModulesCachePath, path);
const uint32_t idx = ePropertyClangModulesCachePath;
return SetPropertyAtIndex(idx, path);
}
FileSpec ModuleListProperties::GetLLDBIndexCachePath() const {
return m_collection_sp
->GetPropertyAtIndexAsOptionValueFileSpec(ePropertyLLDBIndexCachePath)
->GetCurrentValue();
const uint32_t idx = ePropertyLLDBIndexCachePath;
return GetPropertyAtIndexAs<FileSpec>(idx, {});
}
bool ModuleListProperties::SetLLDBIndexCachePath(const FileSpec &path) {
return m_collection_sp->SetPropertyAtIndexAsFileSpec(
ePropertyLLDBIndexCachePath, path);
const uint32_t idx = ePropertyLLDBIndexCachePath;
return SetPropertyAtIndex(idx, path);
}
bool ModuleListProperties::GetEnableLLDBIndexCache() const {