This is an archive of the discontinued LLVM Phabricator instance.

[DwarfGenerator] Emit dwarf address section when dwarf version is not less than 4
ClosedPublic

Authored by lkail on Feb 8 2023, 1:58 AM.

Details

Summary

Some targets (like AIX) might not feature dwarf address section due to low dwarf version. Check before emitting one.

Fixed DebugInfo unit test failures in https://lab.llvm.org/buildbot/#/builders/214/builds/5739.

Diff Detail

Event Timeline

lkail created this revision.Feb 8 2023, 1:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2023, 1:58 AM
lkail requested review of this revision.Feb 8 2023, 1:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2023, 1:58 AM
lkail edited the summary of this revision. (Show Details)Feb 8 2023, 2:00 AM
lkail edited the summary of this revision. (Show Details)Feb 8 2023, 2:04 AM
benmxwl-arm added inline comments.Feb 8 2023, 3:39 AM
llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
586–587

Maybe change this to if (Version >= 5), it looks like the DWARF5 tests are already disabled for AIX, so that should achieve the same effect (if that were not the case these tests would still fail on AIX with this change).

lkail updated this revision to Diff 495999.Feb 8 2023, 6:43 PM
lkail retitled this revision from [DebugInfo] Check if dwarf address section exists to [DebugInfo] Emit dwarf address section when dwarf version is not less than 4.
lkail edited the summary of this revision. (Show Details)

Check dwarf version number per @benmxwl-arm 's suggestion.

lkail marked an inline comment as done.Feb 8 2023, 6:44 PM
lkail retitled this revision from [DebugInfo] Emit dwarf address section when dwarf version is not less than 4 to [DwarfGenerator] Emit dwarf address section when dwarf version is not less than 4.Feb 8 2023, 7:05 PM
lkail added a reviewer: Restricted Project.Feb 9 2023, 7:05 AM

If this fixes the test failures this LGTM

qiucf added a subscriber: qiucf.Feb 9 2023, 6:58 PM

Is this an AIX only restriction or for all DWARF <= 4?

qiucf accepted this revision as: qiucf.Feb 9 2023, 7:13 PM

Looks good, thanks

This revision is now accepted and ready to land.Feb 9 2023, 7:13 PM