HomePhabricator

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

Authored by awarzynski on Apr 14 2021, 3:43 AM.

Description

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

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

Differential Revision: https://reviews.llvm.org/D100558

Details

Committed
awarzynskiApr 21 2021, 2:31 AM
Differential Revision
D100558: [flang][driver] Add support for `-fget-definition`
Parents
rGcd64273f5ed3: [lldb/ELF] Fix IDs of synthetic eh_frame symbols
Branches
Unknown
Tags
Unknown