[clang] [llvm] [PowerPC][AIX] Support #pragma comment copyright for AIX (PR #178184)

Hubert Tong via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 10:57:51 PDT 2026


================
@@ -6641,6 +6623,37 @@ The ``#pragma comment(lib, ...)`` directive is supported on all ELF targets.
 The second parameter is the library name (without the traditional Unix prefix of
 ``lib``).  This allows you to provide an implicit link of dependent libraries.
 
+Embedding Copyright Information on AIX
+======================================
+Clang supports the ``#pragma comment(copyright, "string")`` directive on AIX
+targets. This directive embeds a copyright or identifying string into the
+compiled object file so that the string survives into shared libraries and
+executables. The directive is silently ignored on non-AIX targets.
+
+.. code-block:: c
+
+   #pragma comment(copyright, "string-literal")
+
+The *string-literal* may be any ordinary string constant, including
+concatenated string literals. The directive may appear at file scope; it is
----------------
hubert-reinterpretcast wrote:

I suppose the next question is how numeric escape sequences are interpreted.

https://github.com/llvm/llvm-project/pull/178184


More information about the llvm-commits mailing list