[clang] [llvm] Define CLANG_ABI and LLVM_ABI for z/OS (PR #113333)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 22 08:38:08 PDT 2024


https://github.com/muiez updated https://github.com/llvm/llvm-project/pull/113333

>From dca5899894f81e70ba3a5c990936ac3316256fc9 Mon Sep 17 00:00:00 2001
From: Muiez <muiez at ibm.com>
Date: Tue, 22 Oct 2024 11:23:55 -0400
Subject: [PATCH 1/2] [z/OS] Define CLANG_ABI

---
 clang/include/clang/Support/Compiler.h | 2 +-
 llvm/include/llvm/Support/Compiler.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/include/clang/Support/Compiler.h b/clang/include/clang/Support/Compiler.h
index c35815e106d2e2..aeaa0b61188313 100644
--- a/clang/include/clang/Support/Compiler.h
+++ b/clang/include/clang/Support/Compiler.h
@@ -49,7 +49,7 @@
 #define CLANG_TEMPLATE_ABI __declspec(dllimport)
 #define CLANG_EXPORT_TEMPLATE
 #endif
-#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX)
+#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || defined(__MVS__)
 #define CLANG_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define CLANG_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define CLANG_EXPORT_TEMPLATE
diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index ab0cbff43d749c..c09bcca9e2ba4b 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -197,7 +197,7 @@
 #define LLVM_EXPORT_TEMPLATE
 #endif
 #define LLVM_ABI_EXPORT __declspec(dllexport)
-#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX)
+#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || defined(__MVS__)
 #define LLVM_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define LLVM_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define LLVM_EXPORT_TEMPLATE

>From 2d90ed57c0a8b4e9ad13476fb5d07c839da5afb7 Mon Sep 17 00:00:00 2001
From: Muiez <muiez at ibm.com>
Date: Tue, 22 Oct 2024 11:37:44 -0400
Subject: [PATCH 2/2] clang format

---
 clang/include/clang/Support/Compiler.h | 3 ++-
 llvm/include/llvm/Support/Compiler.h   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/clang/include/clang/Support/Compiler.h b/clang/include/clang/Support/Compiler.h
index aeaa0b61188313..13582b899dc2a6 100644
--- a/clang/include/clang/Support/Compiler.h
+++ b/clang/include/clang/Support/Compiler.h
@@ -49,7 +49,8 @@
 #define CLANG_TEMPLATE_ABI __declspec(dllimport)
 #define CLANG_EXPORT_TEMPLATE
 #endif
-#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || defined(__MVS__)
+#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) ||             \
+    defined(__MVS__)
 #define CLANG_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define CLANG_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define CLANG_EXPORT_TEMPLATE
diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index c09bcca9e2ba4b..591e7647795bb2 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -197,7 +197,8 @@
 #define LLVM_EXPORT_TEMPLATE
 #endif
 #define LLVM_ABI_EXPORT __declspec(dllexport)
-#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || defined(__MVS__)
+#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) ||             \
+    defined(__MVS__)
 #define LLVM_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define LLVM_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define LLVM_EXPORT_TEMPLATE



More information about the cfe-commits mailing list