aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/TableGen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/TableGen.cpp')
-rw-r--r--utils/TableGen/TableGen.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp
index 8cbba22069..1beddf0693 100644
--- a/utils/TableGen/TableGen.cpp
+++ b/utils/TableGen/TableGen.cpp
@@ -108,8 +108,18 @@ namespace {
cl::value_desc("directory"), cl::Prefix);
}
+
+// FIXME: Eliminate globals from tblgen.
RecordKeeper llvm::Records;
+static TGSourceMgr SrcMgr;
+
+void PrintError(TGLoc ErrorLoc, const std::string &Msg) {
+ SrcMgr.PrintError(ErrorLoc, Msg);
+}
+
+
+
/// ParseFile - this function begins the parsing of the specified tablegen
/// file.
static bool ParseFile(const std::string &Filename,
@@ -139,7 +149,6 @@ int main(int argc, char **argv) {
PrettyStackTraceProgram X(argc, argv);
cl::ParseCommandLineOptions(argc, argv);
- TGSourceMgr SrcMgr;
// Parse the input file.
if (ParseFile(InputFilename, IncludeDirs, SrcMgr))