[Lldb-commits] [lldb] [lldb] Let language plugins register their mangling schemes (PR #232925)
Felipe de Azevedo Piovezan via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 28 01:41:25 PDT 2026
================
@@ -36,6 +41,165 @@ using namespace lldb_private;
#pragma mark Mangled
+namespace {
+/// A mangling scheme that a language plugin registered.
+struct RegisteredManglingScheme {
+ static constexpr size_t g_inline_prefixes = 12;
+ static constexpr size_t g_inline_prefix_length = 16;
+
+ llvm::SmallVector<llvm::SmallString<g_inline_prefix_length>,
+ g_inline_prefixes>
+ prefixes;
+ /// If set, a name that starts with one of the prefixes must also match.
+ Mangled::ManglingSchemeMatcher matches = nullptr;
+ lldb::LanguageType language = lldb::eLanguageTypeUnknown;
+ /// Schemes are never removed, so that GetManglingScheme() can read them
+ /// without a lock. Unregistered schemes are only marked inactive. No other
+ /// data is published through this flag, so it needs no memory ordering.
----------------
felipepiovezan wrote:
> No other data is published through this flag
what does this mean? I think this entire paragraph can be reduced to:
> Schemes are only marked inactive and never deleted; it's always safe to use a scheme and memory_order_relaxed can be used with the `active` flag.
https://github.com/llvm/llvm-project/pull/232925
More information about the lldb-commits
mailing list