[PATCH] D57018: Fix lvm::is_trivially_copyable portability issues
Fedor Sergeev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 21 12:42:12 PST 2019
fedor.sergeev requested changes to this revision.
fedor.sergeev added a comment.
This revision now requires changes to proceed.
Sorry, now it fails on is_move_assignable:
] cat copyable_with_llvm.cpp
#include "llvm/Support/type_traits.h"
// code from tools/llvm-xray/xray-converter.cpp
template <typename AssociatedData> struct TrieNode {
int FuncId;
AssociatedData ExtraData;
};
struct StackIdData {
// to get is_trivially_copyable instantiation from within the class
int x [llvm::is_trivially_copyable<TrieNode<StackIdData> *>::value + 1];
};
] g++ -std=c++11 -I ../../llvm/include -I include copyable_with_llvm.cpp
copyable_with_llvm.cpp: In instantiation of ‘struct TrieNode<StackIdData>’:
/gcc/include/c++/4.9.2/type_traits:1183:45: required by substitution of ‘template<class _Tp1, class _Up1, class> static std::true_type std::__is_assignable_helper<_Tp, _Up>::__test(int) [with _Tp1 = llvm::detail::trivial_helper<TrieNode<StackIdData>*>&; _Up1 = llvm::detail::trivial_helper<TrieNode<StackIdData>*>&&; <template-parameter-1-3> = <missing>]’
/gcc/include/c++/4.9.2/type_traits:1192:30: required from ‘class std::__is_assignable_helper<llvm::detail::trivial_helper<TrieNode<StackIdData>*>&, llvm::detail::trivial_helper<TrieNode<StackIdData>*>&&>’
/gcc/include/c++/4.9.2/type_traits:1197:12: required from ‘struct std::is_assignable<llvm::detail::trivial_helper<TrieNode<StackIdData>*>&, llvm::detail::trivial_helper<TrieNode<StackIdData>*>&&>’
/gcc/include/c++/4.9.2/type_traits:1227:12: required from ‘struct std::__is_move_assignable_impl<llvm::detail::trivial_helper<TrieNode<StackIdData>*>, true>’
/gcc/include/c++/4.9.2/type_traits:1233:12: required from ‘struct std::is_move_assignable<llvm::detail::trivial_helper<TrieNode<StackIdData>*> >’
../../llvm/include/llvm/Support/type_traits.h:157:25: required from ‘constexpr const bool llvm::is_trivially_copyable<TrieNode<StackIdData>*>::has_trivial_move_assign’
../../llvm/include/llvm/Support/type_traits.h:170:32: required from ‘constexpr const bool llvm::is_trivially_copyable<TrieNode<StackIdData>*>::value’
copyable_with_llvm.cpp:9:64: required from here
copyable_with_llvm.cpp:5:18: error: ‘TrieNode<AssociatedData>::ExtraData’ has incomplete type
AssociatedData ExtraData;
^
copyable_with_llvm.cpp:7:8: error: forward declaration of ‘struct StackIdData’
struct StackIdData {
^
And yes, the same failure on the actual llvm build on xray-converter.cpp.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57018/new/
https://reviews.llvm.org/D57018
More information about the llvm-commits
mailing list