MS name mangling supports cache for first 10 distinct function arguments.
The error was when non cached template type occurred twice (e.g. 11th and 12th).
For such case in code there is another cache table TemplateArgStrings (for performance reasons).
Then one '@' character at the end of the mangled name taken from this table was missing.
For other cases the missing '@' character was added in mangleSourceName function.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lgtm. I finally got around to understanding the patch. Sorry for the delay, thanks for the fix! Next time you upload a patch, please upload it with more context (see https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface).
Note to self: The mangleSourceName() call mentioned in the patch description is 14 lines further up. mangleSourceName(TemplateMangling); outputs the number if there's a backref, else it outputs the argument followed by a '@'. Since we only cache mangleSourceName()'s argument, we need to append '@' ourselves. It seems a tiny bit nicer to store the '@' in the cache, but as-is is fine too.
Do you need someone to commit this for you?
@thakis Yes please, I cannot commit this patch by myself, because I don't have commit access.
Surely, next time I will add more context in diff.
Thanks a lot for the effort.