From 5f9f9ba00b85eb19da2618f393e43a6a11b5d892 Mon Sep 17 00:00:00 2001 From: David Greene Date: Thu, 14 May 2009 22:38:31 +0000 Subject: 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 --- utils/TableGen/Record.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'utils/TableGen/Record.h') 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 Values; public: + typedef std::vector::iterator iterator; + typedef std::vector::const_iterator const_iterator; + explicit ListInit(std::vector &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::iterator iterator; - typedef std::vector::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; -- cgit v1.2.3