[PATCH] D86126: Fix issue 47160: "`llvm::is_trivially_copyable` -- static assertion failure after DR 1734"
Danila Malyutin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 09:26:50 PST 2021
danilaml added inline comments.
================
Comment at: llvm/include/llvm/Support/type_traits.h:182
- "inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable");
-#endif
};
----------------
serge-sans-paille wrote:
> I understand why you remove this one, but it also removes the only safe guard we had to prevent the ABI issue solved by https://reviews.llvm.org/D54472. I'm fine with removing it, but only if we add a test case that makes sure that we have a consistent behavior for `llvm::is_trivially_copyable` for most of the ADT containers.
@serge-sans-paille please correct me If I'm wrong, but https://reviews.llvm.org/D54472 is solved by using llvm's own `is_trivially_copyable` because older (now unsupported) compilers didn't implement the std:: version properly. static_assert wasn't a safeguard against ABI issues, it was there to ensure that LLVM's own implementation behaved the same as std:: one when it's available and that's all. But when does this assert matter for ABI (when llvm:: version is used everywhere)?
Currently it is impossible to build LLVM on any modern standard-conforming compiler and this fix missed not only 11.0 release but 12.0 as well, which is a shame.
Maybe when Clang will fail to build itself there will be enough will to finally fix it. (there was at least one attempt in the meantime: https://reviews.llvm.org/D92543 )
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86126/new/
https://reviews.llvm.org/D86126
More information about the llvm-commits
mailing list