summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2019-01-22 07:22:45 +0000
committerVitaly Buka <vitalybuka@google.com>2019-01-22 07:22:45 +0000
commit3985ed08cae0f709af9468cf7fc3b938236cf8eb (patch)
tree1c8bc445a90f233418b82c92ca0503caaa9b5ce9
parent1b9cd446f7eff70413477453cc9beed4a69ca45f (diff)
downloadbcm5719-llvm-3985ed08cae0f709af9468cf7fc3b938236cf8eb.tar.gz
bcm5719-llvm-3985ed08cae0f709af9468cf7fc3b938236cf8eb.zip
Revert "Remove static_assert(value == std::is_trivially_copyable<T>::value)"
Upgraded the bot as workaround. This reverts commit r351784. llvm-svn: 351786
-rw-r--r--llvm/include/llvm/Support/type_traits.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/type_traits.h b/llvm/include/llvm/Support/type_traits.h
index a52bd408d27..b8cf12d03d2 100644
--- a/llvm/include/llvm/Support/type_traits.h
+++ b/llvm/include/llvm/Support/type_traits.h
@@ -162,6 +162,10 @@ class is_trivially_copyable {
(has_deleted_move_constructor || has_trivial_move_constructor) &&
(has_deleted_copy_assign || has_trivial_copy_assign) &&
(has_deleted_copy_constructor || has_trivial_copy_constructor);
+
+#if (__has_feature(is_trivially_copyable) || (defined(__GNUC__) && __GNUC__ >= 5))
+ static_assert(value == std::is_trivially_copyable<T>::value, "inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable");
+#endif
};
OpenPOWER on IntegriCloud