Page MenuHomePhabricator

[DebugInfo] Flang should not emit DW_AT_main_subprogram for DWARF version lower than 4
Needs ReviewPublic

Authored by alok on Sep 11 2020, 2:28 AM.



DWARF attribute DW_AT_main_subprogram should be emitted with DWARF version 4 or greater.


  • check-llvm
  • check-debuginfo

Diff Detail

Unit TestsFailed

330 mslinux > DataFlowSanitizer-x86_64.DataFlowSanitizer-x86_64::event_callbacks.c
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang -fsanitize=dataflow -m64 -fno-sanitize=dataflow -O2 -fPIE -DCALLBACKS -c /mnt/disks/ssd0/agent/llvm-project/compiler-rt/test/dfsan/event_callbacks.c -o /mnt/disks/ssd0/agent/llvm-project/build/projects/compiler-rt/test/dfsan/X86_64Config/Output/event_callbacks.c.tmp-callbacks.o

Event Timeline

alok created this revision.Sep 11 2020, 2:28 AM
alok requested review of this revision.Sep 11 2020, 2:28 AM

Is this causing real problems? Usually we emit newer attributes even for older DWARF versions because most consumers just ignore unknown attributes.

DavidTruby resigned from this revision.Sep 30 2020, 5:35 AM
ormris removed a subscriber: ormris.Thu, Jun 3, 11:00 AM