This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Fix emitting .debug_names with -dwarf-sections-as-reference=Enable
Needs ReviewPublic

Authored by ikudrin on Feb 4 2022, 7:30 AM.

Details

Summary

If UseSectionsAsReferences == true, DwarfCompileUnit do not define a separate label at the beginning of the unit and getLabelBegin() cannot be used. To reference the CU, the section symbol and the offset in the debug info section should be used instead.

This fixes a crash in llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll when NVPTX is set as a default target.

Diff Detail

Event Timeline

ikudrin created this revision.Feb 4 2022, 7:30 AM
ikudrin requested review of this revision.Feb 4 2022, 7:30 AM
ormris removed a subscriber: ormris.Feb 7 2022, 10:41 AM