Add ListInit::getValues
authorDavid Greene <greened@obbligato.org>
Fri, 29 Jul 2011 19:06:59 +0000 (19:06 +0000)
committerDavid Greene <greened@obbligato.org>
Fri, 29 Jul 2011 19:06:59 +0000 (19:06 +0000)
Add a getValues ListInit method to return the sequence of values in
the list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136482 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/Record.h

index f4d091723dd4256f9fb613b6c4c0de59057ea8ca..b90a50c222211225b22542fcdcfce18db2b86a36 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef RECORD_H
 #define RECORD_H
 
+#include "llvm/ADT/ArrayRef.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/raw_ostream.h"
@@ -785,6 +786,8 @@ public:
 
   virtual std::string getAsString() const;
 
+  ArrayRef<Init*> getValues() const { return Values; }
+
   inline iterator       begin()       { return Values.begin(); }
   inline const_iterator begin() const { return Values.begin(); }
   inline iterator       end  ()       { return Values.end();   }