[clang] [llvm] [PowerPC][AIX] Support #pragma comment copyright for AIX (PR #178184)
Tony Varghese via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 9 23:08:05 PST 2026
================
@@ -480,7 +481,8 @@ void Parser::initializePragmaHandlers() {
PP.AddPragmaHandler(OpenACCHandler.get());
if (getLangOpts().MicrosoftExt ||
- getTargetInfo().getTriple().isOSBinFormatELF()) {
+ getTargetInfo().getTriple().isOSBinFormatELF() ||
+ getTargetInfo().getTriple().isOSAIX()) {
----------------
tonykuttai wrote:
Current enum kinds
```
enum PragmaMSCommentKind {
PCK_Unknown,
PCK_Linker, // #pragma comment(linker, ...)
PCK_Lib, // #pragma comment(lib, ...)
PCK_Compiler, // #pragma comment(compiler, ...)
PCK_ExeStr, // #pragma comment(exestr, ...)
PCK_User, // #pragma comment(user, ...)
PCK_Copyright // #pragma comment(copyright, ...)
};
```
- for lib and linker, I have added warnings for aix and the pragma is ignored. consistent with the xlc behaviour
- compiler, exestr and user and currently ignored by clang codegen. I think we don't need to handle anything special here.
Added `clang/test/CodeGen/PowerPC/pragma-comment.c` to lock this behaviour down.
https://github.com/llvm/llvm-project/pull/178184
More information about the cfe-commits
mailing list