[Lldb-commits] [lldb] [lldb] Fix CXX's SymbolNameFitsToLanguage matching other languages (PR #153685)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 15 11:49:51 PDT 2025
================
@@ -410,3 +410,20 @@ TEST(CPlusPlusLanguage, DoesNotMatchCxx) {
Mangled swiftSymbol("$sS");
EXPECT_FALSE(CPlusPlusLang->SymbolNameFitsToLanguage(swiftSymbol));
}
+
+TEST(CPlusPlusLanguage, MatchesCxx) {
+ // Test that a symbol name that is C++ does match C++ (both Itanium and MSVC).
+
+ SubsystemRAII<CPlusPlusLanguage> lang;
+ Language *CPlusPlusLang =
+ Language::FindPlugin(lldb::eLanguageTypeC_plus_plus);
+
+ EXPECT_TRUE(CPlusPlusLang != nullptr);
+
+ Mangled itaniumSymbol("_ZFoo");
----------------
Michael137 wrote:
Not that it matters much, but should we make these actually demangle-able symbols?
Some minimal ones are:
```
_Z3Foo
___Z3Bar_block_invoke
?x@@3AH
```
https://github.com/llvm/llvm-project/pull/153685
More information about the lldb-commits
mailing list