[clang] [llvm] [PowerPC][AIX] Support #pragma comment copyright for AIX (PR #178184)
Tony Varghese via cfe-commits
cfe-commits at lists.llvm.org
Fri May 8 17:53:07 PDT 2026
================
@@ -1700,6 +1701,13 @@ PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level,
InlineContext{ThinOrFullLTOPhase::None, InlinePass::CGSCCInliner}));
}
}
+
+ // Lower !comment_string.loadtime metadata to a concrete TU-local string
+ // global and attach !implicit.ref to all defined functions. Running late
+ // ensures compiler-generated functions (e.g. from inlining, coroutines)
+ // are also anchored to the copyright string via .ref directives.
+ MPM.addPass(LowerCommentStringPass());
----------------
tonykuttai wrote:
Primary motivation was to convert `!comment_string.loadtime` metadata to LLVM IR earlier in the pipeline. Also it needs to run in both pre-link and post-link LTO phases, which is simpler in opt. The pass itself is bailed out early for non-aix targets. Having it in the general pipeline makes future extension much easier. update `isSupportedTarget()` when adding z/OS or other targets that need similar load-time comment functionality.
https://github.com/llvm/llvm-project/pull/178184
More information about the cfe-commits
mailing list