diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-13 16:09:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-13 16:09:24 +0000 |
commit | 7b9ffe4a6db2e59c18510aac4ba30902653e13eb (patch) | |
tree | f626b383d32e32f761d3134f2f6a2c1cab7e58c1 /utils/TableGen/TableGen.cpp | |
parent | 1c8ae59dfdc85d917db0333ae0b93e2be4ca6c36 (diff) |
give each Record a location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TableGen.cpp')
-rw-r--r-- | utils/TableGen/TableGen.cpp | 11 |
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)) |