diff options
author | Razvan Lupusoru <razvan.lupusoru@gmail.com> | 2023-10-27 07:49:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-27 07:49:31 -0700 |
commit | 3e32b809001cf3a9d6f9cea4030fb9fe66f083f2 (patch) | |
tree | 675ee8da0f7234c037eab84828d2cfbb0bf0bd4c /flang/module | |
parent | 574c5cc9d8f6fcdf3702f5f98ea07ea6a8ebdfb7 (diff) | |
download | llvm-3e32b809001cf3a9d6f9cea4030fb9fe66f083f2.zip llvm-3e32b809001cf3a9d6f9cea4030fb9fe66f083f2.tar.gz llvm-3e32b809001cf3a9d6f9cea4030fb9fe66f083f2.tar.bz2 |
[flang] Consider bind(c) when lowering calls to intrinsic module procedures (#70386)
When attempting to lower an intrinsic module procedure call, take into
account bind(c). Such procedures cannot be lowered as intrinsics since
their implementation is external to the module.
With this solution, the hardcoded "omp_lib" string can be removed when
checking if intrinsic module procedure since all procedure interfaces in
that module use bind(c).
Diffstat (limited to 'flang/module')
-rw-r--r-- | flang/module/omp_lib.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/flang/module/omp_lib.h b/flang/module/omp_lib.h index d8a9aeb..efc9ceb 100644 --- a/flang/module/omp_lib.h +++ b/flang/module/omp_lib.h @@ -90,7 +90,7 @@ omp_atv_blocked = 17, & omp_atv_interleaved = 18 - type :: omp_alloctrait + type, bind(c) :: omp_alloctrait integer(kind=omp_alloctrait_key_kind) :: key, value end type omp_alloctrait @@ -264,23 +264,23 @@ integer(kind=omp_integer_kind), intent(out) :: place_nums(*) end subroutine omp_get_partition_place_nums - subroutine omp_set_affinity_format(format) + subroutine omp_set_affinity_format(format) bind(c) import character(len=*), intent(in) :: format end subroutine omp_set_affinity_format - function omp_get_affinity_format(buffer) + function omp_get_affinity_format(buffer) bind(c) import character(len=*), intent(out) :: buffer integer(kind=omp_integer_kind) :: omp_get_affinity_format end function omp_get_affinity_format - subroutine omp_display_affinity(format) + subroutine omp_display_affinity(format) bind(c) import character(len=*), intent(in) :: format end subroutine omp_display_affinity - function omp_capture_affinity(buffer, format) + function omp_capture_affinity(buffer, format) bind(c) import character(len=*), intent(out) :: buffer character(len=*), intent(in) :: format @@ -339,7 +339,7 @@ integer(kind=omp_integer_kind) :: omp_pause_resource end function omp_pause_resource - function omp_pause_resource_all(kind) + function omp_pause_resource_all(kind) bind(c) import integer(kind=omp_pause_resource_kind), value :: kind integer(kind=omp_integer_kind) :: omp_pause_resource_all @@ -428,7 +428,7 @@ ! Device Memory Routines ! Memory Management Routines - function omp_init_allocator(memspace, ntraits, traits) + function omp_init_allocator(memspace, ntraits, traits) bind(c) import integer(kind=omp_memspace_handle_kind), value :: memspace integer, value :: ntraits @@ -446,7 +446,7 @@ integer(kind=omp_allocator_handle_kind), value :: allocator end subroutine omp_set_default_allocator - function omp_get_default_allocator() + function omp_get_default_allocator() bind(c) import integer(kind=omp_allocator_handle_kind) :: omp_get_default_allocator end function omp_get_default_allocator |