diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/TableGen/TGParser.h | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/TableGen/TGParser.h')
-rw-r--r-- | llvm/lib/TableGen/TGParser.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/TableGen/TGParser.h b/llvm/lib/TableGen/TGParser.h index c66c797712984..07a4003219f58 100644 --- a/llvm/lib/TableGen/TGParser.h +++ b/llvm/lib/TableGen/TGParser.h @@ -14,18 +14,13 @@ #define LLVM_LIB_TABLEGEN_TGPARSER_H #include "TGLexer.h" -#include "llvm/ADT/Twine.h" -#include "llvm/Support/SourceMgr.h" #include "llvm/TableGen/Error.h" #include "llvm/TableGen/Record.h" #include <map> namespace llvm { - class Record; - class RecordVal; - class RecordKeeper; - class RecTy; - class Init; + class SourceMgr; + class Twine; struct ForeachLoop; struct MultiClass; struct SubClassReference; @@ -112,7 +107,7 @@ public: } void addVar(StringRef Name, Init *I) { - bool Ins = vars.insert(std::make_pair(Name, I)).second; + bool Ins = vars.insert(std::make_pair(std::string(Name), I)).second; (void)Ins; assert(Ins && "Local variable already exists"); } @@ -215,6 +210,7 @@ private: // Semantic analysis methods. bool addDefOne(std::unique_ptr<Record> Rec); private: // Parser methods. + bool consume(tgtok::TokKind K); bool ParseObjectList(MultiClass *MC = nullptr); bool ParseObject(MultiClass *MC); bool ParseClass(); |