Skip to content

Commit 31031e6

Browse files
committed
Remove legacy Swift language constant support
1 parent da9b7d8 commit 31031e6

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,6 @@ ParseSupportFilesFromPrologue(const lldb::ModuleSP &module,
249249
return support_files;
250250
}
251251

252-
static inline bool IsSwiftLanguage(LanguageType language) {
253-
return language == eLanguageTypePLI || language == eLanguageTypeSwift ||
254-
((uint32_t)language == (uint32_t)llvm::dwarf::DW_LANG_Swift);
255-
}
256-
257252
void SymbolFileDWARF::Initialize() {
258253
LogChannelDWARF::Initialize();
259254
PluginManager::RegisterPlugin(GetPluginNameStatic(),
@@ -974,7 +969,7 @@ bool SymbolFileDWARF::ParseImportedModules(
974969
return false;
975970
auto lang = sc.comp_unit->GetLanguage();
976971
if (!ClangModulesDeclVendor::LanguageSupportsClangModules(lang) &&
977-
!IsSwiftLanguage(lang))
972+
lang != eLanguageTypeSwift)
978973
return false;
979974
UpdateExternalModuleListIfNeeded();
980975

@@ -3254,7 +3249,7 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc,
32543249
}
32553250

32563251
if (tag == DW_TAG_variable && mangled &&
3257-
IsSwiftLanguage(sc.comp_unit->GetLanguage()))
3252+
sc.comp_unit->GetLanguage() == eLanguageTypeSwift)
32583253
mangled = NULL;
32593254

32603255
// Prefer DW_AT_location over DW_AT_const_value. Both can be emitted e.g.
@@ -3507,7 +3502,7 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc,
35073502

35083503
// Swift let-bindings are marked by a DW_TAG_const_type.
35093504
bool is_constant = false;
3510-
if (IsSwiftLanguage(sc.comp_unit->GetLanguage())) {
3505+
if (sc.comp_unit->GetLanguage() == eLanguageTypeSwift) {
35113506
DWARFDIE type_die = die.GetReferencedDIE(llvm::dwarf::DW_AT_type);
35123507
if (type_die && type_die.Tag() == llvm::dwarf::DW_TAG_const_type)
35133508
is_constant = true;

0 commit comments

Comments
 (0)