From 4e2aa8014fb7faf136970191ed46fac70991e107 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 7 Jun 2015 06:01:17 +0000 Subject: [PATCH] [TableGen] Write one of the Record constructors in terms of the other constructor to reduce code duplication. NFC llvm-svn: 239247 --- llvm/include/llvm/TableGen/Record.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/llvm/include/llvm/TableGen/Record.h b/llvm/include/llvm/TableGen/Record.h index 9bb7b7a3bdb1..062e03d6e5f8 100644 --- a/llvm/include/llvm/TableGen/Record.h +++ b/llvm/include/llvm/TableGen/Record.h @@ -1182,13 +1182,6 @@ class Record { public: // Constructs a record. - explicit Record(const std::string &N, ArrayRef 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 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 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.