summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/BinaryStreamRef.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-08-21 19:46:46 +0000
committerZachary Turner <zturner@google.com>2017-08-21 19:46:46 +0000
commitabc037927b81561a354601cb8ccb193671fc50d6 (patch)
tree6ff6427d7ea469c9d6609f7c7c9f7836d0bff775 /llvm/lib/Support/BinaryStreamRef.cpp
parent82ec872990f0058c2c5938ecbc649e99a70bef9c (diff)
downloadbcm5719-llvm-abc037927b81561a354601cb8ccb193671fc50d6.tar.gz
bcm5719-llvm-abc037927b81561a354601cb8ccb193671fc50d6.zip
[BinaryStream] Defaultify copy and move constructors.
The various BinaryStream classes had explicit copy constructors which resulted in deleted move constructors. This was causing the internal std::shared_ptr to get copied rather than moved very frequently, since these classes are often used as return values. Patch by Alex Telishev Differential Revision: https://reviews.llvm.org/D36942 llvm-svn: 311368
Diffstat (limited to 'llvm/lib/Support/BinaryStreamRef.cpp')
-rw-r--r--llvm/lib/Support/BinaryStreamRef.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/Support/BinaryStreamRef.cpp b/llvm/lib/Support/BinaryStreamRef.cpp
index fe9a8171e14..70ee156f19f 100644
--- a/llvm/lib/Support/BinaryStreamRef.cpp
+++ b/llvm/lib/Support/BinaryStreamRef.cpp
@@ -77,9 +77,6 @@ BinaryStreamRef::BinaryStreamRef(StringRef Data, endianness Endian)
: BinaryStreamRef(makeArrayRef(Data.bytes_begin(), Data.bytes_end()),
Endian) {}
-BinaryStreamRef::BinaryStreamRef(const BinaryStreamRef &Other)
- : BinaryStreamRefBase(Other) {}
-
Error BinaryStreamRef::readBytes(uint32_t Offset, uint32_t Size,
ArrayRef<uint8_t> &Buffer) const {
if (auto EC = checkOffset(Offset, Size))
@@ -117,9 +114,6 @@ WritableBinaryStreamRef::WritableBinaryStreamRef(MutableArrayRef<uint8_t> Data,
: BinaryStreamRefBase(std::make_shared<MutableArrayRefImpl>(Data, Endian),
0, Data.size()) {}
-WritableBinaryStreamRef::WritableBinaryStreamRef(
- const WritableBinaryStreamRef &Other)
- : BinaryStreamRefBase(Other) {}
Error WritableBinaryStreamRef::writeBytes(uint32_t Offset,
ArrayRef<uint8_t> Data) const {
OpenPOWER on IntegriCloud