aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/BinaryStreamReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/BinaryStreamReader.h')
-rw-r--r--include/llvm/Support/BinaryStreamReader.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Support/BinaryStreamReader.h b/include/llvm/Support/BinaryStreamReader.h
index d994fa0f49d0..f30d82d81b25 100644
--- a/include/llvm/Support/BinaryStreamReader.h
+++ b/include/llvm/Support/BinaryStreamReader.h
@@ -172,11 +172,13 @@ public:
/// \returns a success error code if the data was successfully read, otherwise
/// returns an appropriate error code.
template <typename T, typename U>
- Error readArray(VarStreamArray<T, U> &Array, uint32_t Size) {
+ Error
+ readArray(VarStreamArray<T, U> &Array, uint32_t Size,
+ typename VarStreamArray<T, U>::ContextType *Context = nullptr) {
BinaryStreamRef S;
if (auto EC = readStreamRef(S, Size))
return EC;
- Array = VarStreamArray<T, U>(S, Array.getExtractor());
+ Array = VarStreamArray<T, U>(S, Context);
return Error::success();
}