diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 13:44:06 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 13:44:06 +0000 |
commit | 7ab83427af0f77b59941ceba41d509d7d097b065 (patch) | |
tree | cc41c05b1db454e3d802f34df75e636ee922ad87 /include/llvm/Support/BinaryStreamReader.h | |
parent | d288ef4c1788d3a951a7558c68312c2d320612b1 (diff) |
Diffstat (limited to 'include/llvm/Support/BinaryStreamReader.h')
-rw-r--r-- | include/llvm/Support/BinaryStreamReader.h | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/include/llvm/Support/BinaryStreamReader.h b/include/llvm/Support/BinaryStreamReader.h index 29e8a2ab08aa..738c042add3e 100644 --- a/include/llvm/Support/BinaryStreamReader.h +++ b/include/llvm/Support/BinaryStreamReader.h @@ -198,25 +198,7 @@ public: BinaryStreamRef S; if (auto EC = readStreamRef(S, Size)) return EC; - Array = VarStreamArray<T, U>(S); - return Error::success(); - } - - /// Read a VarStreamArray of size \p Size bytes and store the result into - /// \p Array. Updates the stream's offset to point after the newly read - /// array. Never causes a copy (although iterating the elements of the - /// VarStreamArray may, depending upon the implementation of the underlying - /// stream). - /// - /// \returns a success error code if the data was successfully read, otherwise - /// returns an appropriate error code. - template <typename T, typename U, typename ContextType> - Error readArray(VarStreamArray<T, U> &Array, uint32_t Size, - ContextType &&Context) { - BinaryStreamRef S; - if (auto EC = readStreamRef(S, Size)) - return EC; - Array = VarStreamArray<T, U>(S, std::move(Context)); + Array.setUnderlyingStream(S); return Error::success(); } |