Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 1 | /* |
Jonathan Peyton | de4749b | 2016-12-14 23:01:24 +0000 | [diff] [blame] | 2 | * kmp_ftn_cdecl.cpp -- Fortran __cdecl linkage support for OpenMP. |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 3 | */ |
| 4 | |
| 5 | |
| 6 | //===----------------------------------------------------------------------===// |
| 7 | // |
| 8 | // The LLVM Compiler Infrastructure |
| 9 | // |
| 10 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 11 | // Source Licenses. See LICENSE.txt for details. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | |
| 16 | #include "kmp.h" |
Jonathan Peyton | 1cdd87a | 2016-11-14 21:08:35 +0000 | [diff] [blame] | 17 | #include "kmp_affinity.h" |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 18 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 19 | #if KMP_OS_WINDOWS |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 20 | #if defined KMP_WIN_CDECL || !defined KMP_DYNAMIC_LIB |
| 21 | #define KMP_FTN_ENTRIES KMP_FTN_UPPER |
| 22 | #endif |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 23 | #elif KMP_OS_UNIX |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 24 | #define KMP_FTN_ENTRIES KMP_FTN_PLAIN |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 25 | #endif |
| 26 | |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 27 | // Note: This string is not printed when KMP_VERSION=1. |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 28 | char const __kmp_version_ftncdecl[] = |
| 29 | KMP_VERSION_PREFIX "Fortran __cdecl OMP support: " |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 30 | #ifdef KMP_FTN_ENTRIES |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 31 | "yes"; |
| 32 | #define FTN_STDCALL /* no stdcall */ |
| 33 | #include "kmp_ftn_os.h" |
| 34 | #include "kmp_ftn_entry.h" |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 35 | #else |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 36 | "no"; |
Jim Cownie | 181b4bb | 2013-12-23 17:28:57 +0000 | [diff] [blame] | 37 | #endif /* KMP_FTN_ENTRIES */ |