[AST] Remove respectOriginallyDefinedIn parameter from mangleAnyDecl

This was always set to `true` except for USR mangling, where we already
have it set to `false` for IDE USRs. The other clients were:

- AutoDiff, which is just using the resulting string as a dictionary
key, so don't seem to have any preference.
- The ClangImporter, which always overrides `@_originallyDefinedIn`
anyway.
This commit is contained in:
Hamish Knight
2025-10-23 09:11:17 +01:00
parent b607ec7a2f
commit a1e1656ed5
5 changed files with 12 additions and 18 deletions

View File

@@ -1120,8 +1120,7 @@ static StringRef calculateMangledName(SDKContext &Ctx, ValueDecl *VD) {
return Ctx.buffer(attr->Name);
}
Mangle::ASTMangler NewMangler(VD->getASTContext());
return Ctx.buffer(NewMangler.mangleAnyDecl(VD, true,
/*bool respectOriginallyDefinedIn*/true));
return Ctx.buffer(NewMangler.mangleAnyDecl(VD, /*addPrefix*/ true));
}
static StringRef calculateLocation(SDKContext &SDKCtx, Decl *D) {