X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=utils%2FTableGen%2FTGLexer.h;h=84d328b12d9764d894cc8b626e49d60e36db32c0;hp=f5753a404ebd28d101b24b229f932b6c61c048c9;hb=2e6b97bbf86d0825a060e190189fae7f884c79c9;hpb=c7252ce74324e44efa7ec2506035a8e2d2e93d2f diff --git a/utils/TableGen/TGLexer.h b/utils/TableGen/TGLexer.h index f5753a404eb..84d328b12d9 100644 --- a/utils/TableGen/TGLexer.h +++ b/utils/TableGen/TGLexer.h @@ -14,9 +14,9 @@ #ifndef TGLEXER_H #define TGLEXER_H -#include "llvm/System/DataTypes.h" -#include +#include "llvm/Support/DataTypes.h" #include +#include #include namespace llvm { @@ -36,7 +36,7 @@ namespace tgtok { l_brace, r_brace, // { } l_paren, r_paren, // ( ) less, greater, // < > - colon, semi, // ; : + colon, semi, // : ; comma, period, // , . equal, question, // = ? @@ -46,7 +46,7 @@ namespace tgtok { // !keywords. XConcat, XSRA, XSRL, XSHL, XStrConcat, XCast, XSubst, - XForEach, XCar, XCdr, XNull, XIf, XEq, + XForEach, XHead, XTail, XEmpty, XIf, XEq, // Integer value. IntVal, @@ -72,6 +72,8 @@ class TGLexer { /// CurBuffer - This is the current buffer index we're lexing from as managed /// by the SourceMgr object. int CurBuffer; + /// Dependencies - This is the list of all included files. + std::vector Dependencies; public: TGLexer(SourceMgr &SrcMgr); @@ -80,6 +82,10 @@ public: tgtok::TokKind Lex() { return CurCode = LexToken(); } + + const std::vector &getDependencies() const { + return Dependencies; + } tgtok::TokKind getCode() const { return CurCode; } @@ -95,9 +101,6 @@ public: } SMLoc getLoc() const; - - void PrintError(const char *Loc, const Twine &Msg) const; - void PrintError(SMLoc Loc, const Twine &Msg) const; private: /// LexToken - Read the next token and return its code.