projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ARM64] Rename FP to the UAL-compliant 'X29'.
[oota-llvm.git]
/
lib
/
TableGen
/
TGLexer.h
diff --git
a/lib/TableGen/TGLexer.h
b/lib/TableGen/TGLexer.h
index 7e222875aa8f57ac16aff1cf7a98fd7e075d2fa3..d1bd70d2eca427caf9778ab51118bbf171d0cdde 100644
(file)
--- a/
lib/TableGen/TGLexer.h
+++ b/
lib/TableGen/TGLexer.h
@@
-15,9
+15,10
@@
#define TGLEXER_H
#include "llvm/Support/DataTypes.h"
#define TGLEXER_H
#include "llvm/Support/DataTypes.h"
-#include <string>
-#include <vector>
+#include "llvm/Support/SMLoc.h"
#include <cassert>
#include <cassert>
+#include <map>
+#include <string>
namespace llvm {
class MemoryBuffer;
namespace llvm {
class MemoryBuffer;
@@
-39,13
+40,14
@@
namespace tgtok {
colon, semi, // : ;
comma, period, // , .
equal, question, // = ?
colon, semi, // : ;
comma, period, // , .
equal, question, // = ?
-
+ paste, // #
+
// Keywords.
// Keywords.
- Bit, Bits, Class, Code, Dag, Def,
MultiDef
, Defm, Field, In, Int, Let, List,
+ Bit, Bits, Class, Code, Dag, Def,
Foreach
, Defm, Field, In, Int, Let, List,
MultiClass, String,
// !keywords.
MultiClass, String,
// !keywords.
- XConcat, XSRA, XSRL, XSHL, XStrConcat, XCast, XSubst,
+ XConcat, X
ADD, X
SRA, XSRL, XSHL, XStrConcat, XCast, XSubst,
XForEach, XHead, XTail, XEmpty, XIf, XEq,
// Integer value.
XForEach, XHead, XTail, XEmpty, XIf, XEq,
// Integer value.
@@
-72,9
+74,13
@@
class TGLexer {
/// CurBuffer - This is the current buffer index we're lexing from as managed
/// by the SourceMgr object.
int CurBuffer;
/// CurBuffer - This is the current buffer index we're lexing from as managed
/// by the SourceMgr object.
int CurBuffer;
+
+public:
+ typedef std::map<std::string, SMLoc> DependenciesMapTy;
+private:
/// Dependencies - This is the list of all included files.
/// Dependencies - This is the list of all included files.
-
std::vector<std::string>
Dependencies;
-
+
DependenciesMapTy
Dependencies;
+
public:
TGLexer(SourceMgr &SrcMgr);
~TGLexer() {}
public:
TGLexer(SourceMgr &SrcMgr);
~TGLexer() {}
@@
-83,7
+89,7
@@
public:
return CurCode = LexToken();
}
return CurCode = LexToken();
}
- const
std::vector<std::string>
&getDependencies() const {
+ const
DependenciesMapTy
&getDependencies() const {
return Dependencies;
}
return Dependencies;
}
@@
-109,6
+115,7
@@
private:
tgtok::TokKind ReturnError(const char *Loc, const Twine &Msg);
int getNextChar();
tgtok::TokKind ReturnError(const char *Loc, const Twine &Msg);
int getNextChar();
+ int peekNextChar(int Index);
void SkipBCPLComment();
bool SkipCComment();
tgtok::TokKind LexIdentifier();
void SkipBCPLComment();
bool SkipCComment();
tgtok::TokKind LexIdentifier();