[libcxx-commits] [PATCH] D84200: Disable trivial weak_ptr test on ARM because it is not expected to work.
Vy Nguyen via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 21 09:18:47 PDT 2020
oontvoo added a comment.
> My point is that someone compiling for ARM will define `_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI` thinking they are getting trivial `weak_ptr` and `shared_ptr` passed in registers, but they won't (and silently so). That deception is what I think should be flagged explicitly through an error of some sort. Do you agree?
I can agree that it would seem a bit misleading.
I'm concerned that if we try to get into this business of flagging any potential unsupported case, we'll open a can of worms. That is, the checking here, if we were to be complete, would have to say, if the size of the struct is larger than the limit defined by the target platform, then it's an error. But how do we know what the limit is? There's the theory and there's the practice. For eg, the ARMv7 specs say it reserves 4 registers for the return value, but in practice, it looks like it allows only one (hence the 4 bytes limit). All of these heuristics may turn into an ugly hack (especially if we want to put them in libcxx).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84200/new/
https://reviews.llvm.org/D84200
More information about the libcxx-commits
mailing list