[llvm] r240673 - Add Arg::getValues method with const 'this' and const result

Douglas Katzman dougk at google.com
Thu Jun 25 11:48:26 PDT 2015


Author: dougk
Date: Thu Jun 25 13:48:26 2015
New Revision: 240673

URL: http://llvm.org/viewvc/llvm-project?rev=240673&view=rev
Log:
Add Arg::getValues method with const 'this' and const result

Modified:
    llvm/trunk/include/llvm/Option/Arg.h

Modified: llvm/trunk/include/llvm/Option/Arg.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Option/Arg.h?rev=240673&r1=240672&r2=240673&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Option/Arg.h (original)
+++ llvm/trunk/include/llvm/Option/Arg.h Thu Jun 25 13:48:26 2015
@@ -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)





More information about the llvm-commits mailing list