[flang] Upstream partial lowering of GET_ENVIRONMENT_VARIABLE intrinsic
authorJosh Mottley <Josh.Mottley@arm.com>
Thu, 3 Feb 2022 21:54:56 +0000 (21:54 +0000)
committerJosh Mottley <Josh.Mottley@arm.com>
Tue, 8 Feb 2022 17:42:53 +0000 (17:42 +0000)
commit5ebbcfa01d78477c9b5f170537a8a2719fe199e6
treec63e872a6e5dc27502d5401eaa47d0d16ef9c2dc
parent56d6ccd4cb4aac4c23ac50ae51f9cebb4ea1ad29
[flang] Upstream partial lowering of GET_ENVIRONMENT_VARIABLE intrinsic

This patch adds partial lowering of the "GET_ENVIRONMENT_VARIABLE" intrinsic
to the backend runtime hook implemented in patches D111394 and D112698.
It also renames the `isPresent` lambda to `isAbsent` and moves it out to
its own function in `Command.cpp`. Corresponding comment fixes for this
are also modified. Lastly it adds the i1 type to
`RuntimeCallTestBash.h`.

Differential Revision: https://reviews.llvm.org/D118984
flang/include/flang/Optimizer/Builder/Runtime/Command.h
flang/lib/Optimizer/Builder/Runtime/Command.cpp
flang/unittests/Optimizer/Builder/Runtime/CommandTest.cpp
flang/unittests/Optimizer/Builder/Runtime/RuntimeCallTestBase.h