[flang] Lower command and environment intrinsics
authorValentin Clement <clementval@gmail.com>
Thu, 17 Mar 2022 13:34:58 +0000 (14:34 +0100)
committerValentin Clement <clementval@gmail.com>
Thu, 17 Mar 2022 13:36:51 +0000 (14:36 +0100)
commit2b55850df8ab65b1b349e8e9341e02ca59da9155
treefe817c0d37e2ff1ef2085fa786b178998f403542
parent151c14435037072af795f2bec7626e3951d30965
[flang] Lower command and environment intrinsics

This patch adds lowering for command and environment
related intrinsics:
- `get_command_argument`
- `get_environment_variable`
- `command_argument_count`

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: PeteSteinfeld

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

Co-authored-by: Josh Mottley <Josh.Mottley@arm.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Lower/Intrinsics/command_argument_count.f90 [new file with mode: 0644]
flang/test/Lower/Intrinsics/get_command_argument.f90 [new file with mode: 0644]
flang/test/Lower/Intrinsics/get_environment_variable.f90 [new file with mode: 0644]