[Openmp]: Missing import statement in openmp interface for Fortran

Essentially removed the "use omp_lib_kinds" statement and replaced it
with import to maintain consistency (and avoid compilation error
in case the omp_lib_kinds.mod file is not accessible) in header file.

The import is required to access entities in host scoping unit.

Differential Revision: https://reviews.llvm.org/D120707
This commit is contained in:
Malhar Jajoo 2022-03-01 10:51:21 +00:00
parent 97e013dd6b
commit 6d658f37a4
1 changed files with 6 additions and 6 deletions

View File

@ -746,24 +746,24 @@
end function omp_target_is_accessible
function omp_alloc(size, allocator) bind(c)
use omp_lib_kinds
use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
import :: omp_allocator_handle_kind
type(c_ptr) omp_alloc
integer(c_size_t), value :: size
integer(omp_allocator_handle_kind), value :: allocator
end function omp_alloc
function omp_aligned_alloc(alignment, size, allocator) bind(c)
use omp_lib_kinds
use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
import :: omp_allocator_handle_kind
type(c_ptr) omp_aligned_alloc
integer(c_size_t), value :: alignment, size
integer(omp_allocator_handle_kind), value :: allocator
end function omp_aligned_alloc
function omp_calloc(nmemb, size, allocator) bind(c)
use omp_lib_kinds
use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
import :: omp_allocator_handle_kind
type(c_ptr) omp_calloc
integer(c_size_t), value :: nmemb, size
integer(omp_allocator_handle_kind), value :: allocator
@ -771,8 +771,8 @@
function omp_aligned_calloc(alignment, nmemb, size, &
& allocator) bind(c)
use omp_lib_kinds
use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
import :: omp_allocator_handle_kind
type(c_ptr) omp_aligned_calloc
integer(c_size_t), value :: alignment, nmemb, size
integer(omp_allocator_handle_kind), value :: allocator
@ -780,8 +780,8 @@
function omp_realloc(ptr, size, allocator, &
& free_allocator) bind(c)
use omp_lib_kinds
use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
import :: omp_allocator_handle_kind
type(c_ptr) omp_realloc
type(c_ptr), value :: ptr
integer(c_size_t), value :: size
@ -790,8 +790,8 @@
end function omp_realloc
subroutine omp_free(ptr, allocator) bind(c)
use omp_lib_kinds
use, intrinsic :: iso_c_binding, only : c_ptr
import :: omp_allocator_handle_kind
type(c_ptr), value :: ptr
integer(omp_allocator_handle_kind), value :: allocator
end subroutine omp_free