summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-01-17 01:31:32 +0000
committerChris Lattner <sabre@nondot.org>2012-01-17 01:31:32 +0000
commit1752e45de9914cb52d748c1052ecd2f1414bced4 (patch)
tree333a50e0c3254adb428fcb3d0bacdaae6c9e5c9f
parentff5bad078782b6472d6cd0974bf08fe3473050e6 (diff)
downloadllvm-1752e45de9914cb52d748c1052ecd2f1414bced4.tar.gz
llvm-1752e45de9914cb52d748c1052ecd2f1414bced4.tar.bz2
llvm-1752e45de9914cb52d748c1052ecd2f1414bced4.tar.xz
add some missing const qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148274 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/ArrayRef.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/ArrayRef.h b/include/llvm/ADT/ArrayRef.h
index 33a8c651b2..f41a994031 100644
--- a/include/llvm/ADT/ArrayRef.h
+++ b/include/llvm/ADT/ArrayRef.h
@@ -111,14 +111,14 @@ namespace llvm {
}
/// slice(n) - Chop off the first N elements of the array.
- ArrayRef<T> slice(unsigned N) {
+ ArrayRef<T> slice(unsigned N) const {
assert(N <= size() && "Invalid specifier");
return ArrayRef<T>(data()+N, size()-N);
}
/// slice(n, m) - Chop off the first N elements of the array, and keep M
/// elements in the array.
- ArrayRef<T> slice(unsigned N, unsigned M) {
+ ArrayRef<T> slice(unsigned N, unsigned M) const {
assert(N+M <= size() && "Invalid specifier");
return ArrayRef<T>(data()+N, M);
}