mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
tblgen: Whitespace and 80-col cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165190 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
81be6bfd66
commit
047d3617cb
@ -30,7 +30,7 @@ namespace llvm {
|
|||||||
struct MultiClass;
|
struct MultiClass;
|
||||||
struct SubClassReference;
|
struct SubClassReference;
|
||||||
struct SubMultiClassReference;
|
struct SubMultiClassReference;
|
||||||
|
|
||||||
struct LetRecord {
|
struct LetRecord {
|
||||||
std::string Name;
|
std::string Name;
|
||||||
std::vector<unsigned> Bits;
|
std::vector<unsigned> Bits;
|
||||||
@ -41,7 +41,7 @@ namespace llvm {
|
|||||||
: Name(N), Bits(B), Value(V), Loc(L) {
|
: Name(N), Bits(B), Value(V), Loc(L) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// ForeachLoop - Record the iteration state associated with a for loop.
|
/// ForeachLoop - Record the iteration state associated with a for loop.
|
||||||
/// This is used to instantiate items in the loop body.
|
/// This is used to instantiate items in the loop body.
|
||||||
struct ForeachLoop {
|
struct ForeachLoop {
|
||||||
@ -56,13 +56,13 @@ class TGParser {
|
|||||||
TGLexer Lex;
|
TGLexer Lex;
|
||||||
std::vector<std::vector<LetRecord> > LetStack;
|
std::vector<std::vector<LetRecord> > LetStack;
|
||||||
std::map<std::string, MultiClass*> MultiClasses;
|
std::map<std::string, MultiClass*> MultiClasses;
|
||||||
|
|
||||||
/// Loops - Keep track of any foreach loops we are within.
|
/// Loops - Keep track of any foreach loops we are within.
|
||||||
///
|
///
|
||||||
typedef std::vector<ForeachLoop> LoopVector;
|
typedef std::vector<ForeachLoop> LoopVector;
|
||||||
LoopVector Loops;
|
LoopVector Loops;
|
||||||
|
|
||||||
/// CurMultiClass - If we are parsing a 'multiclass' definition, this is the
|
/// CurMultiClass - If we are parsing a 'multiclass' definition, this is the
|
||||||
/// current value.
|
/// current value.
|
||||||
MultiClass *CurMultiClass;
|
MultiClass *CurMultiClass;
|
||||||
|
|
||||||
@ -82,13 +82,13 @@ class TGParser {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TGParser(SourceMgr &SrcMgr, RecordKeeper &records) :
|
TGParser(SourceMgr &SrcMgr, RecordKeeper &records) :
|
||||||
Lex(SrcMgr), CurMultiClass(0), Records(records) {}
|
Lex(SrcMgr), CurMultiClass(0), Records(records) {}
|
||||||
|
|
||||||
/// ParseFile - Main entrypoint for parsing a tblgen file. These parser
|
/// ParseFile - Main entrypoint for parsing a tblgen file. These parser
|
||||||
/// routines return true on error, or false on success.
|
/// routines return true on error, or false on success.
|
||||||
bool ParseFile();
|
bool ParseFile();
|
||||||
|
|
||||||
bool Error(SMLoc L, const Twine &Msg) const {
|
bool Error(SMLoc L, const Twine &Msg) const {
|
||||||
PrintError(L, Msg);
|
PrintError(L, Msg);
|
||||||
return true;
|
return true;
|
||||||
@ -102,9 +102,9 @@ public:
|
|||||||
|
|
||||||
private: // Semantic analysis methods.
|
private: // Semantic analysis methods.
|
||||||
bool AddValue(Record *TheRec, SMLoc Loc, const RecordVal &RV);
|
bool AddValue(Record *TheRec, SMLoc Loc, const RecordVal &RV);
|
||||||
bool SetValue(Record *TheRec, SMLoc Loc, Init *ValName,
|
bool SetValue(Record *TheRec, SMLoc Loc, Init *ValName,
|
||||||
const std::vector<unsigned> &BitList, Init *V);
|
const std::vector<unsigned> &BitList, Init *V);
|
||||||
bool SetValue(Record *TheRec, SMLoc Loc, const std::string &ValName,
|
bool SetValue(Record *TheRec, SMLoc Loc, const std::string &ValName,
|
||||||
const std::vector<unsigned> &BitList, Init *V) {
|
const std::vector<unsigned> &BitList, Init *V) {
|
||||||
return SetValue(TheRec, Loc, StringInit::get(ValName), BitList, V);
|
return SetValue(TheRec, Loc, StringInit::get(ValName), BitList, V);
|
||||||
}
|
}
|
||||||
@ -170,7 +170,8 @@ private: // Parser methods.
|
|||||||
IDParseMode Mode = ParseValueMode);
|
IDParseMode Mode = ParseValueMode);
|
||||||
Init *ParseValue(Record *CurRec, RecTy *ItemType = 0,
|
Init *ParseValue(Record *CurRec, RecTy *ItemType = 0,
|
||||||
IDParseMode Mode = ParseValueMode);
|
IDParseMode Mode = ParseValueMode);
|
||||||
std::vector<Init*> ParseValueList(Record *CurRec, Record *ArgsRec = 0, RecTy *EltTy = 0);
|
std::vector<Init*> ParseValueList(Record *CurRec, Record *ArgsRec = 0,
|
||||||
|
RecTy *EltTy = 0);
|
||||||
std::vector<std::pair<llvm::Init*, std::string> > ParseDagArgList(Record *);
|
std::vector<std::pair<llvm::Init*, std::string> > ParseDagArgList(Record *);
|
||||||
bool ParseOptionalRangeList(std::vector<unsigned> &Ranges);
|
bool ParseOptionalRangeList(std::vector<unsigned> &Ranges);
|
||||||
bool ParseOptionalBitList(std::vector<unsigned> &Ranges);
|
bool ParseOptionalBitList(std::vector<unsigned> &Ranges);
|
||||||
@ -184,7 +185,7 @@ private: // Parser methods.
|
|||||||
MultiClass *ParseMultiClassID();
|
MultiClass *ParseMultiClassID();
|
||||||
Record *ParseDefmID();
|
Record *ParseDefmID();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user