This is an archive of the discontinued LLVM Phabricator instance.

[DWARF] Default lower bound should respect requested DWARF version
ClosedPublic

Authored by probinson on Feb 28 2017, 6:31 PM.

Details

Summary

DWARF defines a default lower-bound for arrays in the set of languages defined for a particular DWARF version.
But the logic to suppress an unnecessary lower-bound attribute was looking at the hard-coded default DWARF version, not the version that had been requested.

Diff Detail

Event Timeline

probinson created this revision.Feb 28 2017, 6:31 PM
aprantl accepted this revision.Mar 1 2017, 9:01 AM

LGTM.
Could you also add the missing languages (at least BLISS & Renderscript) to the switch while you are in there?

This revision is now accepted and ready to land.Mar 1 2017, 9:01 AM

LGTM.
Could you also add the missing languages (at least BLISS & Renderscript) to the switch while you are in there?

Sure. Dwarf.def didn't have BLISS, and also had Python grouped with v5, when it was actually introduced in v4, so I added a comment there.

And of course... v2 and v3 define a default lower bound only for C, C++, and Fortran (in the dialects defined in those versions). Patched that up too.

Now I want to alphabetize each group of cases in getDefaultLowerBound... I'll do that as a followup NFC.

This revision was automatically updated to reflect the committed changes.