summaryrefslogtreecommitdiff
path: root/llvm/lib/TableGen/TGParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TableGen/TGParser.h')
-rw-r--r--llvm/lib/TableGen/TGParser.h12
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();