mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-02 22:02:51 +01:00
Add a text mode for fingerprinting. (#7231)
The intent is to add visibility into how the fingerprint is computed, so that fingerprinting issues and mangling collisions can be more readily understood and fixed. Assisted-by: Gemini via Antigravity
This commit is contained in:
@@ -480,7 +480,8 @@ static auto BuildCppFunctionDeclForCarbonFn(Context& context,
|
||||
function_decl->setParams(param_var_decls);
|
||||
|
||||
// Mangle the function name and attach it to the `FunctionDecl`.
|
||||
SemIR::Mangler m(context.sem_ir(), context.total_ir_count());
|
||||
SemIR::Mangler m(context.sem_ir(), context.total_ir_count(),
|
||||
context.mangle_string_fingerprint());
|
||||
std::string mangled_name = m.Mangle(function_id, SemIR::SpecificId::None);
|
||||
function_decl->addAttr(
|
||||
clang::AsmLabelAttr::Create(context.ast_context(), mangled_name));
|
||||
|
||||
Reference in New Issue
Block a user