Add Arg::getValues method with const 'this' and const result
authorDouglas Katzman <dougk@google.com>
Thu, 25 Jun 2015 18:48:26 +0000 (18:48 +0000)
committerDouglas Katzman <dougk@google.com>
Thu, 25 Jun 2015 18:48:26 +0000 (18:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240673 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Option/Arg.h

index 5f6941a53d0c6a9b9c36d3f7f1bf6778e1b01357..e1b72b6267cf195d2f12d78b3774ab3fad4ffa0b 100644 (file)
@@ -93,9 +93,8 @@ public:
     return Values[N];
   }
 
-  SmallVectorImpl<const char*> &getValues() {
-    return Values;
-  }
+  SmallVectorImpl<const char *> &getValues() { return Values; }
+  const SmallVectorImpl<const char *> &getValues() const { return Values; }
 
   bool containsValue(StringRef Value) const {
     for (unsigned i = 0, e = getNumValues(); i != e; ++i)