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

Wael Yehia via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 16 10:23:44 PDT 2026


================
@@ -1472,6 +1473,9 @@ PassBuilder::buildModuleOptimizationPipeline(OptimizationLevel Level,
   const bool LTOPreLink = isLTOPreLink(LTOPhase);
   ModulePassManager MPM;
 
+  // Process copyright metadata early, before any optimizations
----------------
w2yehia wrote:

I did say "not as late as link-time LTO".
I meant late in the IR-IR pipeline during prelink (-flto -c) LTO or regular nonLTO (-c) compilation.
Looking at the source, at the end of buildModuleOptimizationPipeline might be what I meant.
The advantage of doing it late is that any compiler generated functions will also have a `.ref` to the copyright variables. 

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


More information about the cfe-commits mailing list