aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/SmallVector.h
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2009-05-21 09:00:37 +0000
committerJay Foad <jay.foad@gmail.com>2009-05-21 09:00:37 +0000
commit82fe2935bf623f09533412126ad31e62dc3167ab (patch)
treee873ad5b86efeb6b61bd84d4c967184c9652d40d /include/llvm/ADT/SmallVector.h
parent9004c8afd4bf7b3f27f4a4f8fd069379afa97c83 (diff)
downloadexternal_llvm-82fe2935bf623f09533412126ad31e62dc3167ab.zip
external_llvm-82fe2935bf623f09533412126ad31e62dc3167ab.tar.gz
external_llvm-82fe2935bf623f09533412126ad31e62dc3167ab.tar.bz2
Implement new SmallVector::data() methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/SmallVector.h')
-rw-r--r--include/llvm/ADT/SmallVector.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h
index bf4960a..de5648f 100644
--- a/include/llvm/ADT/SmallVector.h
+++ b/include/llvm/ADT/SmallVector.h
@@ -374,6 +374,16 @@ public:
return I;
}
+ /// data - Return a pointer to the vector's buffer, even if empty().
+ pointer data() {
+ return pointer(Begin);
+ }
+
+ /// data - Return a pointer to the vector's buffer, even if empty().
+ const_pointer data() const {
+ return const_pointer(Begin);
+ }
+
const SmallVectorImpl &operator=(const SmallVectorImpl &RHS);
bool operator==(const SmallVectorImpl &RHS) const {