[clang] [llvm] [PowerPC][AIX] Support #pragma comment copyright for AIX (PR #178184)
Tony Varghese via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 01:41:08 PDT 2026
================
@@ -0,0 +1,81 @@
+// RUN: split-file %s %t
+
+// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -fsyntax-only -verify %t/unsupported.c
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify %t/unsupported.c
+// RUN: %clang_cc1 -triple systemz -fsyntax-only -verify %t/unsupported.c
+// RUN: %clang_cc1 -triple powerpc64-linux-gnu -fsyntax-only -verify %t/unsupported.c
+
+// RUN: %clang_cc1 -triple powerpc-ibm-aix -fsyntax-only -verify %t/copyright.c
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -fsyntax-only -verify %t/copyright.c
+
+// RUN: %clang_cc1 -triple powerpc-ibm-aix -fsyntax-only -verify %t/empty-copyright.c
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -fsyntax-only -verify %t/empty-copyright.c
+
+// RUN: %clang_cc1 -triple powerpc-ibm-aix -fsyntax-only -verify %t/other-kinds.c
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -fsyntax-only -verify %t/other-kinds.c
+
+// RUN: %clang_cc1 -triple powerpc-ibm-aix -fsyntax-only -verify %t/duplicate.c
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -fsyntax-only -verify %t/duplicate.c
+
+// RUN: %clang_cc1 -triple powerpc-ibm-aix -fsyntax-only -verify %t/concat-escape.c
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -fsyntax-only -verify %t/concat-escape.c
+
+// RUN: %clang_cc1 -triple powerpc-ibm-aix -fsyntax-only -verify %t/u8-literal.c
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -fsyntax-only -verify %t/u8-literal.c
+
+// RUN: %clang_cc1 -triple powerpc-ibm-aix -fsyntax-only -verify %t/wide-literal.c
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -fsyntax-only -verify %t/wide-literal.c
+
+// RUN: %clang_cc1 -triple powerpc-ibm-aix -fsyntax-only -verify %t/utf16-literal.c
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -fsyntax-only -verify %t/utf16-literal.c
+
+// RUN: %clang_cc1 -triple powerpc-ibm-aix -fsyntax-only -verify %t/utf32-literal.c
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -fsyntax-only -verify %t/utf32-literal.c
+
+//--- unsupported.c
+// pragma comment kinds not supported on this target.
+#pragma comment(copyright, "copyright") // expected-warning {{'#pragma comment copyright' ignored}}
+#pragma comment(compiler) // expected-warning {{'#pragma comment compiler' ignored}}
+#pragma comment(exestr, "foo") // expected-warning {{'#pragma comment exestr' ignored}}
+#pragma comment(user, "foo\abar\nbaz\tsomething") // expected-warning {{'#pragma comment user' ignored}}
+
+//--- copyright.c
+// Copyright pragma is accepted without diagnostics.
+#pragma comment(copyright, "copyright") // expected-no-diagnostics
+
+//--- empty-copyright.c
+// An empty copyright string is accepted without diagnostics.
+#pragma comment(copyright, "") // expected-no-diagnostics
+
+//--- other-kinds.c
+// Non-copyright comment kinds produce warnings.
----------------
tonykuttai wrote:
done
https://github.com/llvm/llvm-project/pull/178184
More information about the llvm-commits
mailing list