diff options
Diffstat (limited to 'include/llvm/Support/BinaryStreamRef.h')
-rw-r--r-- | include/llvm/Support/BinaryStreamRef.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Support/BinaryStreamRef.h b/include/llvm/Support/BinaryStreamRef.h index 23ce02fd7ca4..465e724a6886 100644 --- a/include/llvm/Support/BinaryStreamRef.h +++ b/include/llvm/Support/BinaryStreamRef.h @@ -98,6 +98,9 @@ public: BinaryStreamRef(BinaryStreamRef &S, uint32_t Offset, uint32_t Length) = delete; + /// Check if a Stream is valid. + bool valid() const { return Stream != nullptr; } + /// Given an Offset into this StreamRef and a Size, return a reference to a /// buffer owned by the stream. /// |