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

Tony Varghese via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 17 05:02:31 PDT 2026


================
@@ -0,0 +1,150 @@
+//===-- LowerCommentStringPass.cpp - Lower Comment string metadata -------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===---------------------------------------------------------------------===//
+//
+// This pass lowers the module-level comment string metadata emitted by Clang:
+//
+//     !comment_string.loadtime = !{!"Copyright ..."}
+//
+// into concrete, translation-unit-local globals.
+// This Pass is enabled only for AIX.
+// For each module (translation unit), the pass performs the following:
+//
+//   1. Creates a null-terminated, internal constant string global
+//      (`__loadtime_comment_str`) containing the copyright text with
+//      section attribute "__loadtime_comment". The backend places this
----------------
tonykuttai wrote:

done. Named csect section are kept for organizing the strings from other data. updated comments as well.

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


More information about the cfe-commits mailing list