[llvm] r239247 - [TableGen] Write one of the Record constructors in terms of the other constructor to reduce code duplication. NFC

Craig Topper craig.topper at gmail.com
Sat Jun 6 23:01:17 PDT 2015


Author: ctopper
Date: Sun Jun  7 01:01:17 2015
New Revision: 239247

URL: http://llvm.org/viewvc/llvm-project?rev=239247&view=rev
Log:
[TableGen] Write one of the Record constructors in terms of the other constructor to reduce code duplication. NFC

Modified:
    llvm/trunk/include/llvm/TableGen/Record.h

Modified: llvm/trunk/include/llvm/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TableGen/Record.h?rev=239247&r1=239246&r2=239247&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TableGen/Record.h (original)
+++ llvm/trunk/include/llvm/TableGen/Record.h Sun Jun  7 01:01:17 2015
@@ -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.





More information about the llvm-commits mailing list