aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/TGParser.h
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-07-29 19:07:05 +0000
committerDavid Greene <greened@obbligato.org>2011-07-29 19:07:05 +0000
commitf37dd02f7743ebd2424480361f5a7db510495c4f (patch)
tree9c8f6bfe436ec32ede5b9c46eeb65c5024c4c783 /utils/TableGen/TGParser.h
parent60c04af7879c3eda957162737783de726dd177b6 (diff)
downloadexternal_llvm-f37dd02f7743ebd2424480361f5a7db510495c4f.zip
external_llvm-f37dd02f7743ebd2424480361f5a7db510495c4f.tar.gz
external_llvm-f37dd02f7743ebd2424480361f5a7db510495c4f.tar.bz2
[AVX] Constify Inits
Make references to Inits const everywhere. This is the final step before making them unique. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136485 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TGParser.h')
-rw-r--r--utils/TableGen/TGParser.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/utils/TableGen/TGParser.h b/utils/TableGen/TGParser.h
index 8b56b8a..17de468 100644
--- a/utils/TableGen/TGParser.h
+++ b/utils/TableGen/TGParser.h
@@ -33,9 +33,9 @@ namespace llvm {
struct LetRecord {
std::string Name;
std::vector<unsigned> Bits;
- Init *Value;
+ const Init *Value;
SMLoc Loc;
- LetRecord(const std::string &N, const std::vector<unsigned> &B, Init *V,
+ LetRecord(const std::string &N, const std::vector<unsigned> &B, const Init *V,
SMLoc L)
: Name(N), Bits(B), Value(V), Loc(L) {
}
@@ -73,7 +73,7 @@ public:
private: // Semantic analysis methods.
bool AddValue(Record *TheRec, SMLoc Loc, const RecordVal &RV);
bool SetValue(Record *TheRec, SMLoc Loc, const std::string &ValName,
- const std::vector<unsigned> &BitList, Init *V);
+ const std::vector<unsigned> &BitList, const Init *V);
bool AddSubClass(Record *Rec, SubClassReference &SubClass);
bool AddSubMultiClass(MultiClass *CurMC,
SubMultiClassReference &SubMultiClass);
@@ -98,18 +98,18 @@ private: // Parser methods.
SubClassReference ParseSubClassReference(Record *CurRec, bool isDefm);
SubMultiClassReference ParseSubMultiClassReference(MultiClass *CurMC);
- Init *ParseIDValue(Record *CurRec);
- Init *ParseIDValue(Record *CurRec, const std::string &Name, SMLoc NameLoc);
- Init *ParseSimpleValue(Record *CurRec, RecTy *ItemType = 0);
- Init *ParseValue(Record *CurRec, RecTy *ItemType = 0);
- std::vector<Init*> ParseValueList(Record *CurRec, Record *ArgsRec = 0, RecTy *EltTy = 0);
- std::vector<std::pair<llvm::Init*, std::string> > ParseDagArgList(Record *);
+ const Init *ParseIDValue(Record *CurRec);
+ const Init *ParseIDValue(Record *CurRec, const std::string &Name, SMLoc NameLoc);
+ const Init *ParseSimpleValue(Record *CurRec, RecTy *ItemType = 0);
+ const Init *ParseValue(Record *CurRec, RecTy *ItemType = 0);
+ std::vector<const Init*> ParseValueList(Record *CurRec, Record *ArgsRec = 0, RecTy *EltTy = 0);
+ std::vector<std::pair<const llvm::Init*, std::string> > ParseDagArgList(Record *);
bool ParseOptionalRangeList(std::vector<unsigned> &Ranges);
bool ParseOptionalBitList(std::vector<unsigned> &Ranges);
std::vector<unsigned> ParseRangeList();
bool ParseRangePiece(std::vector<unsigned> &Ranges);
RecTy *ParseType();
- Init *ParseOperation(Record *CurRec);
+ const Init *ParseOperation(Record *CurRec);
RecTy *ParseOperatorType();
std::string ParseObjectName();
Record *ParseClassID();