llvm.org GIT mirror llvm / df70939
[TableGen] Write one of the Record constructors in terms of the other constructor to reduce code duplication. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239247 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 5 years ago
1 changed file(s) with 4 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
11811181
11821182 public:
11831183 // Constructs a record.
1184 explicit Record(const std::string &N, ArrayRef locs,
1185 RecordKeeper &records, bool Anonymous = false) :
1186 ID(LastID++), Name(StringInit::get(N)), Locs(locs.begin(), locs.end()),
1187 TrackedRecords(records), TheInit(nullptr), IsAnonymous(Anonymous),
1188 ResolveFirst(false) {
1189 init();
1190 }
11911184 explicit Record(Init *N, ArrayRef locs, RecordKeeper &records,
11921185 bool Anonymous = false) :
11931186 ID(LastID++), Name(N), Locs(locs.begin(), locs.end()),
11951188 ResolveFirst(false) {
11961189 init();
11971190 }
1191 explicit Record(const std::string &N, ArrayRef locs,
1192 RecordKeeper &records, bool Anonymous = false)
1193 : Record(StringInit::get(N), locs, records, Anonymous) {}
1194
11981195
11991196 // When copy-constructing a Record, we must still guarantee a globally unique
12001197 // ID number. All other fields can be copied normally.