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.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/llvm/Support/BinaryStreamReader.h b/include/llvm/Support/BinaryStreamReader.h
index 392958de30d5..d8fddde66bfa 100644
--- a/include/llvm/Support/BinaryStreamReader.h
+++ b/include/llvm/Support/BinaryStreamReader.h
@@ -1,9 +1,8 @@
//===- BinaryStreamReader.h - Reads objects from a binary stream *- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -97,6 +96,18 @@ public:
return Error::success();
}
+ /// Read an unsigned LEB128 encoded value.
+ ///
+ /// \returns a success error code if the data was successfully read, otherwise
+ /// returns an appropriate error code.
+ Error readULEB128(uint64_t &Dest);
+
+ /// Read a signed LEB128 encoded value.
+ ///
+ /// \returns a success error code if the data was successfully read, otherwise
+ /// returns an appropriate error code.
+ Error readSLEB128(int64_t &Dest);
+
/// Read a null terminated string from \p Dest. Whether a copy occurs depends
/// on the implementation of the underlying stream. Updates the stream's
/// offset to point after the newly read data.