diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-13 16:01:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-13 16:01:53 +0000 |
commit | 1c8ae59dfdc85d917db0333ae0b93e2be4ca6c36 (patch) | |
tree | 6f5e05ef52d3c8eac1f42518dc5d7db4be9d8949 /utils/TableGen/TGParser.h | |
parent | d9c9bf77d82a00c2fe34db2da00244523f4ac288 (diff) | |
download | llvm-1c8ae59dfdc85d917db0333ae0b93e2be4ca6c36.tar.gz llvm-1c8ae59dfdc85d917db0333ae0b93e2be4ca6c36.tar.bz2 llvm-1c8ae59dfdc85d917db0333ae0b93e2be4ca6c36.tar.xz |
make "locations" a class instead of a typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TGParser.h')
-rw-r--r-- | utils/TableGen/TGParser.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/TableGen/TGParser.h b/utils/TableGen/TGParser.h index a1aa8a9c2b..5d5330de51 100644 --- a/utils/TableGen/TGParser.h +++ b/utils/TableGen/TGParser.h @@ -15,6 +15,7 @@ #define TGPARSER_H #include "TGLexer.h" +#include "TGSourceMgr.h" #include <map> namespace llvm { @@ -29,9 +30,9 @@ namespace llvm { std::string Name; std::vector<unsigned> Bits; Init *Value; - TGLexer::LocTy Loc; + TGLoc Loc; LetRecord(const std::string &N, const std::vector<unsigned> &B, Init *V, - TGLexer::LocTy L) + TGLoc L) : Name(N), Bits(B), Value(V), Loc(L) { } }; @@ -45,7 +46,6 @@ class TGParser { /// current value. MultiClass *CurMultiClass; public: - typedef TGLexer::LocTy LocTy; TGParser(TGSourceMgr &SrcMgr) : Lex(SrcMgr), CurMultiClass(0) {} @@ -55,7 +55,7 @@ public: /// routines return true on error, or false on success. bool ParseFile(); - bool Error(LocTy L, const std::string &Msg) const { + bool Error(TGLoc L, const std::string &Msg) const { Lex.PrintError(L, Msg); return true; } @@ -63,8 +63,8 @@ public: return Error(Lex.getLoc(), Msg); } private: // Semantic analysis methods. - bool AddValue(Record *TheRec, LocTy Loc, const RecordVal &RV); - bool SetValue(Record *TheRec, LocTy Loc, const std::string &ValName, + bool AddValue(Record *TheRec, TGLoc Loc, const RecordVal &RV); + bool SetValue(Record *TheRec, TGLoc Loc, const std::string &ValName, const std::vector<unsigned> &BitList, Init *V); bool AddSubClass(Record *Rec, SubClassReference &SubClass); @@ -89,7 +89,7 @@ private: // Parser methods. SubClassReference ParseSubClassReference(Record *CurRec, bool isDefm); Init *ParseIDValue(Record *CurRec); - Init *ParseIDValue(Record *CurRec, const std::string &Name, LocTy NameLoc); + Init *ParseIDValue(Record *CurRec, const std::string &Name, TGLoc NameLoc); Init *ParseSimpleValue(Record *CurRec); Init *ParseValue(Record *CurRec); std::vector<Init*> ParseValueList(Record *CurRec); |