mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
[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
This commit is contained in:
1 parent
20d6747043
commit
df70939242
1 file changed
+4
-7
@@ -1182,13 +1182,6 @@ class Record {
|
||||
|
||||
public:
|
||||
// Constructs a record.
|
||||
explicit Record(const std::string &N, ArrayRef<SMLoc> locs,
|
||||
RecordKeeper &records, bool Anonymous = false) :
|
||||
ID(LastID++), Name(StringInit::get(N)), Locs(locs.begin(), locs.end()),
|
||||
TrackedRecords(records), TheInit(nullptr), IsAnonymous(Anonymous),
|
||||
ResolveFirst(false) {
|
||||
init();
|
||||
}
|
||||
explicit Record(Init *N, ArrayRef<SMLoc> locs, RecordKeeper &records,
|
||||
bool Anonymous = false) :
|
||||
ID(LastID++), Name(N), Locs(locs.begin(), locs.end()),
|
||||
@@ -1196,6 +1189,10 @@ public:
|
||||
ResolveFirst(false) {
|
||||
init();
|
||||
}
|
||||
explicit Record(const std::string &N, ArrayRef<SMLoc> locs,
|
||||
RecordKeeper &records, bool Anonymous = false)
|
||||
: Record(StringInit::get(N), locs, records, Anonymous) {}
|
||||
|
||||
|
||||
// When copy-constructing a Record, we must still guarantee a globally unique
|
||||
// ID number. All other fields can be copied normally.
|
||||
|
||||
Reference in new issue
Block a user