[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-10 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm added a comment. > Given that we have a legacy XL macro with no legacy cross compiler I think > it's fine if we set this according to the target only. It's fully redundant > to `_AIX ` but we'll define it for any working use-case with the current xlC > compiler. If IBM has a com

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-09 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm added a comment. In D107242#2934611 , @joerg wrote: > clang is fundamentally a cross-compiler only. I don't see any point for > having host-specific branches in this case at all. Either the macro should be > specified for the target all th

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-09 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. clang is fundamentally a cross-compiler only. I don't see any point for having host-specific branches in this case at all. Either the macro should be specified for the target all the time or not at all, but it should most definitely not depend on the host. That's actually

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-09 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm added a comment. In D107242#2932289 , @joerg wrote: > I'm puzzled by this change. I don't think we have any case so far where the > compiler behavior changes with the host OS and I don't think it should. > What's the point / use case of th

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-07 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. In D107242#2932289 , @joerg wrote: > I'm puzzled by this change. I don't think we have any case so far where the > compiler behavior changes with the host OS and I don't think it should. > What's the point / use case of this ma

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-06 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I'm puzzled by this change. I don't think we have any case so far where the compiler behavior changes with the host OS and I don't think it should. What's the point / use case of this macro? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-06 Thread Jake Egan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG869d07ee88a4: [AIX] Define __HOS_AIX__ macro (authored by Jake-Egan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107242/new/ https://reviews.llvm.org/D10

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-06 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm accepted this revision. cebowleratibm added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107242/new/ https://reviews.llvm.org/D107242 _

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-06 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan updated this revision to Diff 364779. Jake-Egan added a comment. Use a temp rather than a local var. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107242/new/ https://reviews.llvm.org/D107242 Files: clang/lib/Basic/Targets/PPC.cpp cl

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-05 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm added inline comments. Comment at: clang/lib/Basic/Targets/PPC.cpp:306 + llvm::Triple HostTriple(llvm::sys::getProcessTriple()); + if (HostTriple.isOSAIX() && getTriple().isOSAIX()) { +Builder.defineMacro("__HOS_AIX__"); suggest using a temp r

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-05 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm added inline comments. Comment at: clang/test/Preprocessor/not-host-aix.c:2 +// UNSUPPORTED: system-aix +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-linux-gnu -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-LINUX %

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-05 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan updated this revision to Diff 364685. Jake-Egan added a comment. Only define if AIX is the target and host. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107242/new/ https://reviews.llvm.org/D107242 Files: clang/lib/Basic/Targets/PPC.c

[PATCH] D107242: [AIX] Define __HOS_AIX__ macro

2021-08-04 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm requested changes to this revision. cebowleratibm added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Basic/Targets/OSTargets.h:679 Builder.defineMacro("__TOS_AIX__"); +Builder.defineMacro("__HOS_AIX__"); --