summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/utils/TableGen/TGParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/utils/TableGen/TGParser.h')
-rw-r--r--contrib/llvm/utils/TableGen/TGParser.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/llvm/utils/TableGen/TGParser.h b/contrib/llvm/utils/TableGen/TGParser.h
index 0aee931..9cdf68f 100644
--- a/contrib/llvm/utils/TableGen/TGParser.h
+++ b/contrib/llvm/utils/TableGen/TGParser.h
@@ -15,12 +15,14 @@
#define TGPARSER_H
#include "TGLexer.h"
+#include "llvm/ADT/Twine.h"
#include "llvm/Support/SourceMgr.h"
#include <map>
namespace llvm {
class Record;
class RecordVal;
+ class RecordKeeper;
struct RecTy;
struct Init;
struct MultiClass;
@@ -46,18 +48,22 @@ class TGParser {
/// CurMultiClass - If we are parsing a 'multiclass' definition, this is the
/// current value.
MultiClass *CurMultiClass;
+
+ // Record tracker
+ RecordKeeper &Records;
public:
- TGParser(SourceMgr &SrcMgr) : Lex(SrcMgr), CurMultiClass(0) {}
+ TGParser(SourceMgr &SrcMgr, RecordKeeper &records) :
+ Lex(SrcMgr), CurMultiClass(0), Records(records) {}
/// ParseFile - Main entrypoint for parsing a tblgen file. These parser
/// routines return true on error, or false on success.
bool ParseFile();
- bool Error(SMLoc L, const std::string &Msg) const {
+ bool Error(SMLoc L, const Twine &Msg) const {
Lex.PrintError(L, Msg);
return true;
}
- bool TokError(const std::string &Msg) const {
+ bool TokError(const Twine &Msg) const {
return Error(Lex.getLoc(), Msg);
}
private: // Semantic analysis methods.
OpenPOWER on IntegriCloud