================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to