From 168fb79817f0debbf446bc1893c8ce18b410bf13 Mon Sep 17 00:00:00 2001 From: Ebuka Ezike Date: Wed, 24 Sep 2025 10:13:06 +0100 Subject: [PATCH] [lldb] look up function names in the swift language plugin (#11477) when setting breakpoints if the If the language type not set, try the swift plugin. (cherry picked from commit 13c116b3de9bb6f2f637ec1f39c25efe43335696) # Conflicts: # lldb/test/API/lang/swift/break_by_partial_name/TestSwiftBreakByPartialName.py --- lldb/source/Core/Module.cpp | 6 +++++- .../break_by_partial_name/TestSwiftBreakByPartialName.py | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 731aa6688d275..ed17078190763 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -661,7 +661,11 @@ Module::LookupInfo::LookupInfo(ConstString name, if (language != eLanguageTypeUnknown) lang_types.push_back(language); else - lang_types = {eLanguageTypeObjC, eLanguageTypeC_plus_plus}; + lang_types = {eLanguageTypeObjC, eLanguageTypeC_plus_plus, +#ifdef LLDB_ENABLE_SWIFT + eLanguageTypeSwift +#endif + }; for (LanguageType lang_type : lang_types) { if (Language *lang = Language::FindPlugin(lang_type)) diff --git a/lldb/test/API/lang/swift/break_by_partial_name/TestSwiftBreakByPartialName.py b/lldb/test/API/lang/swift/break_by_partial_name/TestSwiftBreakByPartialName.py index c0a1dbc0407c8..3387454914887 100644 --- a/lldb/test/API/lang/swift/break_by_partial_name/TestSwiftBreakByPartialName.py +++ b/lldb/test/API/lang/swift/break_by_partial_name/TestSwiftBreakByPartialName.py @@ -13,12 +13,10 @@ Tests that we can break on a partial name of a Swift function Effectively tests our chopper of Swift demangled names """ -import lldb from lldbsuite.test.lldbtest import * from lldbsuite.test.decorators import * import lldbsuite.test.lldbutil as lldbutil - class SwiftPartialBreakTest(TestBase): @swiftTest def test_swift_partial_break(self):