[PATCH] D135326: Half-done attempt to move tail padding callback from TargetCXXABI to TargetInfo
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 6 19:19:42 PDT 2022
dblaikie added inline comments.
================
Comment at: clang/lib/Basic/Targets/OSTargets.h:169
+ if (T.getOS() == llvm::Triple::WatchOS ||
+ this->getCXXABI().getKind() == TargetCXXABI::AppleARM64)
+ return TargetInfo::UseTailPaddingUnlessPOD11;
----------------
rnk wrote:
> I think it would be equivalent to check `T.getArch() == llvm::Triple::AArch64`, that's probably what set the TargetCXXABI.
Hmm, seems one of the tests failed because apparently CXXABI can be chosen separately from target. `clang/test/CodeGenCXX/armv7k.cpp` for instance runs with `-triple=arm64_32-apple-ios -emit-llvm -target-abi darwinpcs`
Which seems to have an UnknownOS on the triple, but a WatchOS on the TargetCXXABI... (I don't really understand/haven't looked into how all these things relate to the command line arguments there - none of it mentions WatchOS, but maybe `darwinpcs` is the name of watchOS?
Updating this function to inspect the CXXABI for WatchOS, AppleARM64, and iOS (which I'd missed from here previously) here makes the tests pass...
Maybe that suggests we should move all this (& the D119051) to TargetCXXABI?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135326/new/
https://reviews.llvm.org/D135326
More information about the cfe-commits
mailing list