[llvm-commits] [llvm] r148274 - /llvm/trunk/include/llvm/ADT/ArrayRef.h

Chris Lattner sabre at nondot.org
Mon Jan 16 17:31:32 PST 2012


Author: lattner
Date: Mon Jan 16 19:31:32 2012
New Revision: 148274

URL: http://llvm.org/viewvc/llvm-project?rev=148274&view=rev
Log:
add some missing const qualifiers.

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=148274&r1=148273&r2=148274&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ArrayRef.h (original)
+++ llvm/trunk/include/llvm/ADT/ArrayRef.h Mon Jan 16 19:31:32 2012
@@ -111,14 +111,14 @@
     }
 
     /// 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);
     }





More information about the llvm-commits mailing list