summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-02-18 01:51:00 +0000
committerZachary Turner <zturner@google.com>2017-02-18 01:51:00 +0000
commit607418771e0301388f0a9a37166c5a6899ff6c98 (patch)
tree30abc3b2b44dbe7104f101a94355a076e8a949bc
parenta32c08d304c1bda06c7e503e5db98ac3ec6a07cb (diff)
downloadbcm5719-llvm-607418771e0301388f0a9a37166c5a6899ff6c98.tar.gz
bcm5719-llvm-607418771e0301388f0a9a37166c5a6899ff6c98.zip
Remove the is_trivially_copyable check entirely.
This is still breaking builds because some compilers think this type is not trivially copyable even when it should be. Reverting this static_assert until I have time to investigate. llvm-svn: 295529
-rw-r--r--llvm/include/llvm/DebugInfo/MSF/StreamReader.h6
-rw-r--r--llvm/include/llvm/DebugInfo/MSF/StreamWriter.h7
2 files changed, 0 insertions, 13 deletions
diff --git a/llvm/include/llvm/DebugInfo/MSF/StreamReader.h b/llvm/include/llvm/DebugInfo/MSF/StreamReader.h
index 719a26def08..93131c6eb65 100644
--- a/llvm/include/llvm/DebugInfo/MSF/StreamReader.h
+++ b/llvm/include/llvm/DebugInfo/MSF/StreamReader.h
@@ -65,8 +65,6 @@ public:
}
template <typename T> Error readObject(const T *&Dest) {
- static_assert(isPodLike<T>::value,
- "Can only read trivially copyable object types!");
ArrayRef<uint8_t> Buffer;
if (auto EC = readBytes(Buffer, sizeof(T)))
return EC;
@@ -76,8 +74,6 @@ public:
template <typename T>
Error readArray(ArrayRef<T> &Array, uint32_t NumElements) {
- static_assert(isPodLike<T>::value,
- "Can only read trivially copyable object types!");
ArrayRef<uint8_t> Bytes;
if (NumElements == 0) {
Array = ArrayRef<T>();
@@ -104,8 +100,6 @@ public:
template <typename T>
Error readArray(FixedStreamArray<T> &Array, uint32_t NumItems) {
- static_assert(isPodLike<T>::value,
- "Can only read trivially copyable object types!");
if (NumItems == 0) {
Array = FixedStreamArray<T>();
return Error::success();
diff --git a/llvm/include/llvm/DebugInfo/MSF/StreamWriter.h b/llvm/include/llvm/DebugInfo/MSF/StreamWriter.h
index 69bb5505efb..9444b92ad2b 100644
--- a/llvm/include/llvm/DebugInfo/MSF/StreamWriter.h
+++ b/llvm/include/llvm/DebugInfo/MSF/StreamWriter.h
@@ -17,7 +17,6 @@
#include "llvm/DebugInfo/MSF/StreamRef.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
-#include "llvm/Support/type_traits.h"
#include <cstdint>
#include <type_traits>
@@ -62,15 +61,11 @@ public:
"writeObject should not be used with pointers, to write "
"the pointed-to value dereference the pointer before calling "
"writeObject");
- static_assert(isPodLike<T>::value,
- "Can only serialize trivially copyable object types");
return writeBytes(
ArrayRef<uint8_t>(reinterpret_cast<const uint8_t *>(&Obj), sizeof(T)));
}
template <typename T> Error writeArray(ArrayRef<T> Array) {
- static_assert(isPodLike<T>::value,
- "Can only serialize trivially copyable object types");
if (Array.empty())
return Error::success();
@@ -88,8 +83,6 @@ public:
}
template <typename T> Error writeArray(FixedStreamArray<T> Array) {
- static_assert(isPodLike<T>::value,
- "Can only serialize trivially copyable object types");
return writeStreamRef(Array.getUnderlyingStream());
}
OpenPOWER on IntegriCloud