give each Record a location.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66897 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp
index 8cbba22..1beddf0 100644
--- a/utils/TableGen/TableGen.cpp
+++ b/utils/TableGen/TableGen.cpp
@@ -108,8 +108,18 @@
               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 @@
   PrettyStackTraceProgram X(argc, argv);
   cl::ParseCommandLineOptions(argc, argv);
 
-  TGSourceMgr SrcMgr;
   
   // Parse the input file.
   if (ParseFile(InputFilename, IncludeDirs, SrcMgr))