[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

@@ -155,8 +155,7 @@ static std::string getMangledNameString(const Decl *D) {
if (!VD)
return std::string();
Mangle::ASTMangler mangler(VD->getASTContext());
return mangler.mangleAnyDecl(VD, /*prefix=*/true,
/*respectOriginallyDefinedIn=*/true);
return mangler.mangleAnyDecl(VD, /*addPrefix*/ true);
}
static std::string getTypeString(const ValueDecl *VD) {