summaryrefslogtreecommitdiff
path: root/include/llvm/Support/BinaryStreamArray.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/BinaryStreamArray.h')
-rw-r--r--include/llvm/Support/BinaryStreamArray.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/BinaryStreamArray.h b/include/llvm/Support/BinaryStreamArray.h
index 65ec15f6d9e0..3f5562ba7519 100644
--- a/include/llvm/Support/BinaryStreamArray.h
+++ b/include/llvm/Support/BinaryStreamArray.h
@@ -290,6 +290,12 @@ public:
return FixedStreamArrayIterator<T>(*this, size());
}
+ const T &front() const { return *begin(); }
+ const T &back() const {
+ FixedStreamArrayIterator<T> I = end();
+ return *(--I);
+ }
+
BinaryStreamRef getUnderlyingStream() const { return Stream; }
private: