[Openmp-commits] [openmp] 84d8ace - [OpenMP][Obvious] Fix function prototype when used in C mode

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 25 07:35:31 PDT 2023


Author: Joseph Huber
Date: 2023-10-25T09:35:23-05:00
New Revision: 84d8ace51a5afb07b528f65cde091cf3dbd7c326

URL: https://github.com/llvm/llvm-project/commit/84d8ace51a5afb07b528f65cde091cf3dbd7c326
DIFF: https://github.com/llvm/llvm-project/commit/84d8ace51a5afb07b528f65cde091cf3dbd7c326.diff

LOG: [OpenMP][Obvious] Fix function prototype when used in C mode

Summary:
The `llvm_omp_target_dynamic_shared_alloc` prototype in `omp.h`
accidentally left the void argument unspecified. This created unintended
code when called from the C language, causing some `nvlink` failures in
certain scenarios.

Added: 
    

Modified: 
    openmp/runtime/src/include/omp.h.var

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/include/omp.h.var b/openmp/runtime/src/include/omp.h.var
index f372402be37d39c..0dd3a533a365059 100644
--- a/openmp/runtime/src/include/omp.h.var
+++ b/openmp/runtime/src/include/omp.h.var
@@ -502,7 +502,7 @@
     extern int __KAI_KMPC_CONVENTION omp_in_explicit_task(void);
 
     /* LLVM Extensions */
-    extern void *llvm_omp_target_dynamic_shared_alloc();
+    extern void *llvm_omp_target_dynamic_shared_alloc(void);
 
 #   undef __KAI_KMPC_CONVENTION
 #   undef __KMP_IMP


        


More information about the Openmp-commits mailing list