This is an archive of the discontinued LLVM Phabricator instance.

Change in symbol renaming to help demanglers and debugger. clang part.
ClosedPublic

Authored by Sunil_Srivastava on May 4 2015, 12:05 PM.

Details

Reviewers
rnk
Summary

This is the second half of http://reviews.llvm.org/D9481, for tools/clang.

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.

Diff Detail

Event Timeline

Sunil_Srivastava retitled this revision from to Change in symbol renaming to help demanglers and debugger. clang part..
Sunil_Srivastava updated this object.
Sunil_Srivastava edited the test plan for this revision. (Show Details)
Sunil_Srivastava added subscribers: Unknown Object (MLST), Unknown Object (MLST).
rnk accepted this revision.May 4 2015, 12:55 PM
rnk added a reviewer: rnk.
rnk added a subscriber: rnk.

This is just a test case update. Feel free to apply this when D9481 lands.

This revision is now accepted and ready to land.May 4 2015, 12:55 PM

Thanks. Submitted in r237151.