Page MenuHomePhabricator

[flang][driver] Add support for `-fget-definition`
ClosedPublic

Authored by awarzynski on Thu, Apr 15, 6:51 AM.

Details

Summary

This patch adds -fget-definition to flang-new. The semantics of this
option are identical in both drivers. The error message in the
"throwaway" driver is updated so that it matches the one from
flang-new (which is auto-generated and cannot be changed easily).

Tests are updated accordingly. A dedicated test for error handling was
added: get-definition.f90 (for the sake of simplicity,
getdefinition01.f90 no longer tests for errors).

The ParseFrontendArgs function is updated so that it can return
errors. This change is required in order to report invalid values
following -fget-definition.

The actual implementation of GetDefinitionAction::ExecuteAction() was
extracted from f18.cpp (i.e. the bit that deals with
-fget-definition).

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

Diff Detail

Event Timeline

awarzynski created this revision.Thu, Apr 15, 6:51 AM
awarzynski requested review of this revision.Thu, Apr 15, 6:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptThu, Apr 15, 6:51 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Rebase on top of D100556

This revision is now accepted and ready to land.Tue, Apr 20, 3:45 AM
This revision was landed with ongoing or failed builds.Wed, Apr 21, 2:31 AM
This revision was automatically updated to reflect the committed changes.