[all-commits] [llvm/llvm-project] 9df0ba: [flang] Implement GET_ENVIRONMENT_VARIABLE(VALUE)
Diana via All-commits
all-commits at lists.llvm.org
Mon Nov 1 02:19:39 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9df0ba599c3c777a37557ddcc567c85dae4c33d3
https://github.com/llvm/llvm-project/commit/9df0ba599c3c777a37557ddcc567c85dae4c33d3
Author: Diana Picus <diana.picus at linaro.org>
Date: 2021-11-01 (Mon, 01 Nov 2021)
Changed paths:
M flang/include/flang/ISO_Fortran_binding.h
M flang/include/flang/Runtime/command.h
M flang/include/flang/Runtime/magic-numbers.h
M flang/runtime/command.cpp
M flang/runtime/stat.cpp
M flang/runtime/stat.h
M flang/unittests/Runtime/CommandTest.cpp
Log Message:
-----------
[flang] Implement GET_ENVIRONMENT_VARIABLE(VALUE)
Implement the second entry point for GET_ENVIRONMENT_VARIABLE. Reuse
existing bits and pieces wherever possible.
This patch also increases CFI_* error codes in order to avoid conflicts.
GET_ENVIRONMENT_VARIABLE is required to return a status of 1 if an
environment variable does not exist and 2 if environment variables are
not supported. However, if we add status codes for that they will
conflict with CFI_ERROR_BASE_ADDR_NULL and CFI_ERROR_BASE_ADDR_NOT_NULL,
which are also 1 and 2 at the moment. We therefore move all CFI error
codes up (an arbitrary) 10 spots to make room. Hopefully this isn't
a problem, since we weren't matching the CFI error codes that gfortran
uses anyway. It may still be an issue if any other runtime functions
will need to return a status of 1 or 2, but we should probably deal with
that when/if it occurs.
Differential Revision: https://reviews.llvm.org/D112698
More information about the All-commits
mailing list