[llvm-commits] [llvm] r125536 - /llvm/trunk/include/llvm/ADT/ArrayRef.h
Chris Lattner
sabre at nondot.org
Mon Feb 14 16:06:37 PST 2011
Author: lattner
Date: Mon Feb 14 18:06:37 2011
New Revision: 125536
URL: http://llvm.org/viewvc/llvm-project?rev=125536&view=rev
Log:
fix some typos.
Modified:
llvm/trunk/include/llvm/ADT/ArrayRef.h
Modified: llvm/trunk/include/llvm/ADT/ArrayRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ArrayRef.h?rev=125536&r1=125535&r2=125536&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ArrayRef.h (original)
+++ llvm/trunk/include/llvm/ADT/ArrayRef.h Mon Feb 14 18:06:37 2011
@@ -17,8 +17,8 @@
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 @@
: 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 @@
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 @@
/// @name Operator Overloads
/// @{
- char operator[](size_t Index) const {
+ const T &operator[](size_t Index) const {
assert(Index < Length && "Invalid index!");
return Data[Index];
}
More information about the llvm-commits
mailing list