From 9421406aada374f79ce2f8e576824463f7830981 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Thu, 22 Dec 2011 23:04:07 +0000 Subject: drop unneeded config.h includes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147197 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/TGLexer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/TableGen/TGLexer.cpp') diff --git a/lib/TableGen/TGLexer.cpp b/lib/TableGen/TGLexer.cpp index 45d0b1e..0977b00 100644 --- a/lib/TableGen/TGLexer.cpp +++ b/lib/TableGen/TGLexer.cpp @@ -15,7 +15,6 @@ #include "llvm/TableGen/Error.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/MemoryBuffer.h" -#include "llvm/Config/config.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/ADT/Twine.h" #include -- cgit v1.1 From 8cc300cb3415d1d806e6f9e6ecb7c3d3f8341ad2 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Thu, 22 Dec 2011 23:08:39 +0000 Subject: try to fix MSVC build git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147198 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/TGLexer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/TableGen/TGLexer.cpp') diff --git a/lib/TableGen/TGLexer.cpp b/lib/TableGen/TGLexer.cpp index 0977b00..c9c674c 100644 --- a/lib/TableGen/TGLexer.cpp +++ b/lib/TableGen/TGLexer.cpp @@ -22,6 +22,9 @@ #include #include #include + +#include "llvm/Config/config.h" + using namespace llvm; TGLexer::TGLexer(SourceMgr &SM) : SrcMgr(SM) { -- cgit v1.1 From bfbc9fcb8330e00f5fd6d1a52131950eb69be934 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Thu, 22 Dec 2011 23:16:09 +0000 Subject: TableGen: add a comment git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147199 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/TGLexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/TableGen/TGLexer.cpp') diff --git a/lib/TableGen/TGLexer.cpp b/lib/TableGen/TGLexer.cpp index c9c674c..79d9ed2 100644 --- a/lib/TableGen/TGLexer.cpp +++ b/lib/TableGen/TGLexer.cpp @@ -23,7 +23,7 @@ #include #include -#include "llvm/Config/config.h" +#include "llvm/Config/config.h" // for strtoull()/strtoll() define using namespace llvm; -- cgit v1.1 From cebb4ee93a0064e4a2cb1fd1da7455b01e5655cb Mon Sep 17 00:00:00 2001 From: David Greene Date: Wed, 22 Feb 2012 16:09:41 +0000 Subject: Add Foreach Loop Add some data structures to represent for loops. These will be referenced during object processing to do any needed iteration and instantiation. Add foreach keyword support to the lexer. Add a mode to indicate that we're parsing a foreach loop. This allows the value parser to early-out when processing the foreach value list. Add a routine to parse foreach iteration declarations. This is separate from ParseDeclaration because the type of the named value (the iterator) doesn't match the type of the initializer value (the value list). It also needs to add two values to the foreach record: the iterator and the value list. Add parsing support for foreach. Add the code to process foreach loops and create defs based on iterator values. Allow foreach loops to be matched at the top level. When parsing an IDValue check if it is a foreach loop iterator for one of the active loops. If so, return a VarInit for it. Add Emacs keyword support for foreach. Add VIM keyword support for foreach. Add tests to check foreach operation. Add TableGen documentation for foreach. Support foreach with multiple objects. Support non-braced foreach body with one object. Do not require types for the foreach declaration. Assume the iterator type from the iteration list element type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151164 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/TGLexer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/TableGen/TGLexer.cpp') diff --git a/lib/TableGen/TGLexer.cpp b/lib/TableGen/TGLexer.cpp index 79d9ed2..ff322e7 100644 --- a/lib/TableGen/TGLexer.cpp +++ b/lib/TableGen/TGLexer.cpp @@ -274,6 +274,7 @@ tgtok::TokKind TGLexer::LexIdentifier() { .Case("dag", tgtok::Dag) .Case("class", tgtok::Class) .Case("def", tgtok::Def) + .Case("foreach", tgtok::Foreach) .Case("defm", tgtok::Defm) .Case("multiclass", tgtok::MultiClass) .Case("field", tgtok::Field) -- cgit v1.1