Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
7 changed files
with
203 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters