This is an archive of the discontinued LLVM Phabricator instance.

[CodeView] Allow variable names to be as long as the codeview format supports
ClosedPublic

Authored by bwyma on Jan 16 2018, 12:41 PM.

Details

Summary

Instead of reserving 0xF00 bytes for the fixed length portion of each CodeView symbol record (which is often much smaller) calculate the fixed portion of the record length to allow for the maximum string length possible. This prevents unnecessary truncation of the symbol name.

Although you'll probably never see names this long in hand-written code, it can occur in generated source code.
If we have the space we might as well let people use it if they want.

I updated the existing long-names.ll test to also check for long variable names.

Diff Detail

Event Timeline

bwyma created this revision.Jan 16 2018, 12:41 PM
zturner accepted this revision.Jan 16 2018, 1:29 PM
This revision is now accepted and ready to land.Jan 16 2018, 1:29 PM
This revision was automatically updated to reflect the committed changes.