This is an archive of the discontinued LLVM Phabricator instance.

[flang][driver] Fix `-fdebug-dump-provenance`
ClosedPublic

Authored by awarzynski on Mar 18 2021, 2:47 AM.

Details

Summary

The -fdebug-dump-provenance flag is meant to be used with
needProvenanceRangeToCharBlockMappings set to true. This way, extra
mapping is generated that allows e.g. IDEs to retrieve symbol's scope
(offset into cooked character stream) based on symbol's source code
location. This patch makes sure that this option is set when
using -fdebug-dump-provenance.

With this patch, the implementation of -fdebug-dump-provenance in
flang-new -fc1 becomes consistent with f18. The corresponding LIT
test is updated so that it can be shared with f18. I refined it a bit
so that:

  • it becomes a frontend-only test
  • it's stricter about the expected output

Depends on: https://reviews.llvm.org/D99292

Diff Detail

Event Timeline

awarzynski created this revision.Mar 18 2021, 2:47 AM
awarzynski requested review of this revision.Mar 18 2021, 2:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 2:48 AM

Rebase on top of D99292

awarzynski edited the summary of this revision. (Show Details)Mar 24 2021, 12:26 PM
awarzynski added a project: Restricted Project.
arnamoy10 accepted this revision.Mar 29 2021, 8:40 AM
This revision is now accepted and ready to land.Mar 29 2021, 8:40 AM
This revision was landed with ongoing or failed builds.Apr 7 2021, 6:15 AM
This revision was automatically updated to reflect the committed changes.