From: Jay Foad Date: Thu, 21 May 2009 09:00:37 +0000 (+0000) Subject: Implement new SmallVector::data() methods. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=82fe2935bf623f09533412126ad31e62dc3167ab;p=oota-llvm.git Implement new SmallVector::data() methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72209 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index bf4960ad144..de5648fe852 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 {