[flang-commits] [flang] [flang] Implement IERRNO intrinsic (PR #124281)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon Jan 27 02:32:51 PST 2025
https://github.com/tblah commented:
Thank you for adding this.
I think for something so simple as this you could get away with implementing this as a library procedure instead of a full-on intrinsic because the call to the runtime doesn't need any wrapping.
In short, you don't need the changes in `intrinsics.cpp` or `intrinsicCall.cpp` etc. Just add a `FORTRAN_PROCEDURE_NAME(ierrno)` to the runtime. Then flang can lower this as a generic unresolved function call which is then provided by the runtime.
For example see `ACCESS()`: https://github.com/llvm/llvm-project/pull/88517
https://github.com/llvm/llvm-project/pull/124281
More information about the flang-commits
mailing list