[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)
Sean Perry via cfe-commits
cfe-commits at lists.llvm.org
Fri May 9 12:03:13 PDT 2025
================
@@ -5087,6 +5087,19 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
assert(EllipsisLoc.isInvalid() &&
"Friend ellipsis but not friend-specified?");
+ if (DS.isExportSpecified()) {
+ VisibilityAttr *existingAttr = TagD->getAttr<VisibilityAttr>();
+ if (existingAttr) {
+ VisibilityAttr::VisibilityType existingValue =
+ existingAttr->getVisibility();
+ if (existingValue != VisibilityAttr::Default)
+ Diag(DS.getExportSpecLoc(), diag::err_mismatched_visibility);
+ } else {
+ Tag->addAttr(
----------------
perry-ca wrote:
Totally valid. The intention was to have these be another way to specify `__attribute__((visibility("default")))`. I've rewritten the code to these issues and have hopefully addressed all of your concerns.
https://github.com/llvm/llvm-project/pull/111035
More information about the cfe-commits
mailing list