I noticed D144232. This makes sure the ELFv2 ABI is utilized properly on all OS's that use the ELFv2 ABI.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM, some minor clang-format nits, but these aren't critical (to me at least :)
clang/lib/Basic/Targets/PPC.h | ||
---|---|---|
432 | clang-format seems to want to format the if as: if ((Triple.isOSFreeBSD() && (Triple.getOSVersion().empty() || Triple.getOSMajorVersion() >= 13)) || Triple.isOSOpenBSD() || Triple.isMusl()) E,g. it groups the whole FreeBSD expression together. I didn't know it could do this, but it seems relatively clear. | |
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | ||
242 | similarly for this one, clang-format likes to format it as: if ((TT.isOSFreeBSD() && (TT.getOSVersion().empty() || TT.getOSMajorVersion() >= 13)) || TT.isOSOpenBSD() || TT.isMusl()) |
clang/lib/Basic/Targets/PPC.h | ||
---|---|---|
432 |
I can see both ways of doing things. I try to keep it as compact as possible. But I'll go with the suggested format. |
clang/lib/Basic/Targets/PPC.h | ||
---|---|---|
430–432 | I am generally not a fan of keeping multiple instances of a somewhat complex conditions in sync. I wonder if the community would be OK with one of:
Then of course, we can use that function in both places. |
clang/lib/Basic/Targets/PPC.h | ||
---|---|---|
430–432 |
Ultimately something like that would be better as it's used in 3 different spots. |
clang-format seems to want to format the if as:
E,g. it groups the whole FreeBSD expression together. I didn't know it could do this, but it seems relatively clear.