Index: utils/TableGen/TGLexer.h |
=================================================================== |
--- utils/TableGen/TGLexer.h (revision 138929) |
+++ utils/TableGen/TGLexer.h (working copy) |
@@ -74,9 +74,13 @@ |
int CurBuffer; |
/// Dependencies - This is the list of all included files. |
std::vector<std::string> Dependencies; |
- |
+ |
+ /// PreProcDefines - This holds a list of TableGen defines (similar in |
+ /// spirit to C pre-processor defines). |
+ std::vector<std::string> PreProcDefines; |
+ |
public: |
- TGLexer(SourceMgr &SrcMgr); |
+ TGLexer(SourceMgr &SrcMgr, std::vector<std::string> PreProcDefines); |
~TGLexer() {} |
tgtok::TokKind Lex() { |
@@ -101,7 +105,9 @@ |
} |
SMLoc getLoc() const; |
- |
+ |
+ bool hasPreProcDefine(const std::string &Symbol) const; |
+ |
private: |
/// LexToken - Read the next token and return its code. |
tgtok::TokKind LexToken(); |
@@ -113,6 +119,8 @@ |
bool SkipCComment(); |
tgtok::TokKind LexIdentifier(); |
bool LexInclude(); |
+ bool LexIncludeIf(); |
+ bool AddIncludeFile(const std::string &Filename); |
tgtok::TokKind LexString(); |
tgtok::TokKind LexVarName(); |
tgtok::TokKind LexNumber(); |