summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-15 00:06:37 +0000
committerChris Lattner <sabre@nondot.org>2011-02-15 00:06:37 +0000
commit84b2a40b4c48aef7542cdd8f54ba67e6021be557 (patch)
tree082ddab086cff0b1805c8b4814ade779900fae66
parent05e63e0e37115db0e7e8cfa1f64fec9db35ba543 (diff)
downloadbcm5719-llvm-84b2a40b4c48aef7542cdd8f54ba67e6021be557.tar.gz
bcm5719-llvm-84b2a40b4c48aef7542cdd8f54ba67e6021be557.zip
fix some typos.
llvm-svn: 125536
-rw-r--r--llvm/include/llvm/ADT/ArrayRef.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h
index b0162553ce4..0ab96ccb9ab 100644
--- a/llvm/include/llvm/ADT/ArrayRef.h
+++ b/llvm/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];
}
OpenPOWER on IntegriCloud