From: Zachary Turner Date: Sat, 18 Feb 2017 01:51:00 +0000 (+0000) Subject: Remove the is_trivially_copyable check entirely. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47c9a8fc0d294fafebdd5e550a5e23da2be3c3a5;p=llvm 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295529 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/DebugInfo/MSF/StreamReader.h b/include/llvm/DebugInfo/MSF/StreamReader.h index 719a26def08..93131c6eb65 100644 --- a/include/llvm/DebugInfo/MSF/StreamReader.h +++ b/include/llvm/DebugInfo/MSF/StreamReader.h @@ -65,8 +65,6 @@ public: } template Error readObject(const T *&Dest) { - static_assert(isPodLike::value, - "Can only read trivially copyable object types!"); ArrayRef Buffer; if (auto EC = readBytes(Buffer, sizeof(T))) return EC; @@ -76,8 +74,6 @@ public: template Error readArray(ArrayRef &Array, uint32_t NumElements) { - static_assert(isPodLike::value, - "Can only read trivially copyable object types!"); ArrayRef Bytes; if (NumElements == 0) { Array = ArrayRef(); @@ -104,8 +100,6 @@ public: template Error readArray(FixedStreamArray &Array, uint32_t NumItems) { - static_assert(isPodLike::value, - "Can only read trivially copyable object types!"); if (NumItems == 0) { Array = FixedStreamArray(); return Error::success(); diff --git a/include/llvm/DebugInfo/MSF/StreamWriter.h b/include/llvm/DebugInfo/MSF/StreamWriter.h index 69bb5505efb..9444b92ad2b 100644 --- a/include/llvm/DebugInfo/MSF/StreamWriter.h +++ b/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 #include @@ -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::value, - "Can only serialize trivially copyable object types"); return writeBytes( ArrayRef(reinterpret_cast(&Obj), sizeof(T))); } template Error writeArray(ArrayRef Array) { - static_assert(isPodLike::value, - "Can only serialize trivially copyable object types"); if (Array.empty()) return Error::success(); @@ -88,8 +83,6 @@ public: } template Error writeArray(FixedStreamArray Array) { - static_assert(isPodLike::value, - "Can only serialize trivially copyable object types"); return writeStreamRef(Array.getUnderlyingStream()); }