summaryrefslogtreecommitdiff
path: root/utils/TableGen/Record.h
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-05-14 22:38:31 +0000
committerDavid Greene <greened@obbligato.org>2009-05-14 22:38:31 +0000
commit5f9f9ba00b85eb19da2618f393e43a6a11b5d892 (patch)
treebd237c2d0cb6a5ec6c114294dfdb5bd049d1501a /utils/TableGen/Record.h
parentbeb31a51f67f651c5fa3c5094a78266d04a697a5 (diff)
downloadllvm-5f9f9ba00b85eb19da2618f393e43a6a11b5d892.tar.gz
llvm-5f9f9ba00b85eb19da2618f393e43a6a11b5d892.tar.bz2
llvm-5f9f9ba00b85eb19da2618f393e43a6a11b5d892.tar.xz
Graduate LLVM to the big leagues by embedding a LISP processor into TableGen.
Ok, not really, but do support some common LISP functions: * car * cdr * null git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.h')
-rw-r--r--utils/TableGen/Record.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h
index c37f6e6207..c2549dab73 100644
--- a/utils/TableGen/Record.h
+++ b/utils/TableGen/Record.h
@@ -690,9 +690,14 @@ public:
class ListInit : public Init {
std::vector<Init*> Values;
public:
+ typedef std::vector<Init*>::iterator iterator;
+ typedef std::vector<Init*>::const_iterator const_iterator;
+
explicit ListInit(std::vector<Init*> &Vs) {
Values.swap(Vs);
}
+ explicit ListInit(iterator Start, iterator End)
+ : Values(Start, End) {}
unsigned getSize() const { return Values.size(); }
Init *getElement(unsigned i) const {
@@ -717,9 +722,6 @@ public:
virtual std::string getAsString() const;
- typedef std::vector<Init*>::iterator iterator;
- typedef std::vector<Init*>::const_iterator const_iterator;
-
inline iterator begin() { return Values.begin(); }
inline const_iterator begin() const { return Values.begin(); }
inline iterator end () { return Values.end(); }
@@ -761,7 +763,7 @@ public:
///
class UnOpInit : public OpInit {
public:
- enum UnaryOp { CAST };
+ enum UnaryOp { CAST, CAR, CDR, LNULL };
private:
UnaryOp Opc;
Init *LHS;