[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 2 08:27:47 PDT 2020


aaron.ballman added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6898
   case ParsedAttr::AT_Constructor:
-    handleConstructorAttr(S, D, AL);
+    if (S.Context.getTargetInfo().getTriple().isOSAIX())
+      S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << "";
----------------
This change (and the others like it) should be done within Attr.td and not exposed here. You should make these attributes target-specific.

You should also update AttrDocs.td for these attributes to document that they're not supported on AIX.


================
Comment at: clang/test/CodeGen/aix-priority-attribute.cpp:1-4
+// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -x c++ -emit-llvm < %s 2>&1 | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -x c++ -emit-llvm < %s 2>&1 | \
+// RUN: FileCheck %s
----------------
I think this test file should live in SemaCXX instead, as this is not testing the codegen behavior, but testing the semantic checking behavior.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74166/new/

https://reviews.llvm.org/D74166





More information about the cfe-commits mailing list