This is an archive of the discontinued LLVM Phabricator instance.

[DWARF v4] Suppressing the __debug_ranges section when there are no ranges
ClosedPublic

Authored by wolfgangp on Jul 31 2018, 11:09 AM.

Details

Summary

One of the clang tests in debuginfo-tests (apple-accel.cpp) insists on checking for the existence of the __debug_ranges section (it requires darwin) even for trivial code which doesn't need any range lists. My recent patch to implement DWARF v5 rnglists suppressed the section for trivial cases and broke the test. To pacify the bots I disabled the suppression for DWARF 4, restoring the original behavior.

This patch (actually 2, debuginfo-tests is a separate repo) fixes the test and re-enables the suppression of unneeded DWARF 4 (and earlier) range lists.

@aprantl , @JDevlieghere Could you please make sure the test change makes sense. I am not that well-versed with Mach-O. I'm just trying to force the compiler to emit ranges.

Diff Detail

Repository
rL LLVM

Event Timeline

wolfgangp created this revision.Jul 31 2018, 11:09 AM
aprantl accepted this revision.Jul 31 2018, 12:30 PM
aprantl added inline comments.
apple-accel.cpp
11 ↗(On Diff #158328)

A comment why this is necessary would be nice.

This revision is now accepted and ready to land.Jul 31 2018, 12:30 PM
This revision was automatically updated to reflect the committed changes.