From c54b1a7001e9046a39dbfb00bbec554882c5267d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 17 Jan 2012 01:31:32 +0000 Subject: [PATCH] add some missing const qualifiers. llvm-svn: 148274 --- include/llvm/ADT/ArrayRef.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/ADT/ArrayRef.h b/include/llvm/ADT/ArrayRef.h index 33a8c651b23..f41a9940318 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 slice(unsigned N) { + ArrayRef slice(unsigned N) const { assert(N <= size() && "Invalid specifier"); return ArrayRef(data()+N, size()-N); } /// slice(n, m) - Chop off the first N elements of the array, and keep M /// elements in the array. - ArrayRef slice(unsigned N, unsigned M) { + ArrayRef slice(unsigned N, unsigned M) const { assert(N+M <= size() && "Invalid specifier"); return ArrayRef(data()+N, M); }