This is an archive of the discontinued LLVM Phabricator instance.

Change in symbol renaming to help demanglers and debuggers
ClosedPublic

Authored by Sunil_Srivastava on May 4 2015, 11:26 AM.

Details

Reviewers
rnk
Summary

Renaming of local symbols, to make unique names, used to just append a number. That creates trouble for demanglers by making these names un-demangle-able. So, for example, '_ZL3ByePi' becomes '_ZL3ByePi1', which is not acceptable to the demangler.

In similar situations Gcc prepends a dot before the number, and existing demanglers already know to stop at a dot. This change in ValueSymbolTable.cpp does the same for llvm.

The code change should not cause any difference in generated code, because these are all local symbols.

However, there are several cases (60) in the regression test that fail with the extra dot because the IR dumps are being checked for the old style renaming. That requires tweaks to these tests, about half in llvm and the rest in tools/clang. I will be submitting a separate review request for clang.

Diff Detail

Event Timeline

Sunil_Srivastava retitled this revision from to Change in symbol renaming to help demanglers and debuggers.
Sunil_Srivastava updated this object.
Sunil_Srivastava edited the test plan for this revision. (Show Details)
Sunil_Srivastava added a subscriber: Unknown Object (MLST).May 4 2015, 12:05 PM
emaste added a subscriber: emaste.May 5 2015, 7:00 AM
rnk accepted this revision.May 6 2015, 11:42 AM
rnk added a reviewer: rnk.
rnk added a subscriber: rnk.

lgtm

This is a big change, so I bugged David Majnemer and Eric Christopher, and we agreed this is the way to go.

This revision is now accepted and ready to land.May 6 2015, 11:42 AM

Thanks. Submitted in r237150