Skip to content

Conversation

@muiez
Copy link
Member

@muiez muiez commented Oct 22, 2024

This patch fixes the build failure seen on z/OS:

llvm/clang/include/clang/ASTMatchers/ASTMatchers.h:7212:1: error: unknown type name 'CLANG_ABI'

@muiez muiez self-assigned this Oct 22, 2024
@llvmbot llvmbot added clang Clang issues not falling into any other category llvm:support labels Oct 22, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 22, 2024

@llvm/pr-subscribers-llvm-support

Author: None (muiez)

Changes

This patch fixes the build failure seen on z/OS:

llvm/clang/include/clang/ASTMatchers/ASTMatchers.h:7212:1: error: unknown type name 'CLANG_ABI'

Full diff: https://github.com/llvm/llvm-project/pull/113333.diff

2 Files Affected:

  • (modified) clang/include/clang/Support/Compiler.h (+1-1)
  • (modified) llvm/include/llvm/Support/Compiler.h (+1-1)
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

@llvmbot
Copy link
Member

llvmbot commented Oct 22, 2024

@llvm/pr-subscribers-clang

Author: None (muiez)

Changes

This patch fixes the build failure seen on z/OS:

llvm/clang/include/clang/ASTMatchers/ASTMatchers.h:7212:1: error: unknown type name 'CLANG_ABI'

Full diff: https://github.com/llvm/llvm-project/pull/113333.diff

2 Files Affected:

  • (modified) clang/include/clang/Support/Compiler.h (+1-1)
  • (modified) llvm/include/llvm/Support/Compiler.h (+1-1)
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

@github-actions
Copy link

github-actions bot commented Oct 22, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@abhina-sree abhina-sree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just needs to include the suggested formatting fix

@muiez muiez merged commit 9edb4f7 into llvm:main Oct 22, 2024
4 checks passed
@muiez muiez deleted the muiez/define-clang-abi branch October 22, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category llvm:support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants