diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-15 00:06:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-15 00:06:37 +0000 |
commit | 04df049014396fe97a31bf3fa8951201b2ed8ffe (patch) | |
tree | 704a830821f6237360ca7cd730632b1a4a06faa4 /include | |
parent | 727961a1a3507a8f7e47ba80a1e37fc68bfc8199 (diff) | |
download | llvm-04df049014396fe97a31bf3fa8951201b2ed8ffe.tar.gz llvm-04df049014396fe97a31bf3fa8951201b2ed8ffe.tar.bz2 llvm-04df049014396fe97a31bf3fa8951201b2ed8ffe.tar.xz |
fix some typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/ArrayRef.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/ADT/ArrayRef.h b/include/llvm/ADT/ArrayRef.h index b0162553ce..0ab96ccb9a 100644 --- a/include/llvm/ADT/ArrayRef.h +++ b/include/llvm/ADT/ArrayRef.h @@ -17,8 +17,8 @@ namespace llvm { class APInt; /// ArrayRef - Represent a constant reference to an array (0 or more elements - /// consequtively in memory), i.e. a start pointer and a length. It allows - /// various APIs to take consequtive elements easily and conveniently. + /// consecutively in memory), i.e. a start pointer and a length. It allows + /// various APIs to take consecutive elements easily and conveniently. /// /// This class does not own the underlying data, it is expected to be used in /// situations where the data resides in some other buffer, whose lifetime @@ -53,7 +53,7 @@ namespace llvm { : Data(&OneElt), Length(1) {} /// Construct an ArrayRef from a pointer and length. - /*implicit*/ ArrayRef(T *data, size_t length) + /*implicit*/ ArrayRef(const T *data, size_t length) : Data(data), Length(length) {} /// Construct an ArrayRef from a SmallVector. @@ -85,7 +85,7 @@ namespace llvm { return Data[0]; } - /// back - Get the last character in the string. + /// back - Get the last element. const T &back() const { assert(!empty()); return Data[Length-1]; @@ -95,7 +95,7 @@ namespace llvm { /// @name Operator Overloads /// @{ - char operator[](size_t Index) const { + const T &operator[](size_t Index) const { assert(Index < Length && "Invalid index!"); return Data[Index]; } |