summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/TableGen/Record.h1
-rw-r--r--lib/TableGen/Record.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h
index 0c9c909972..55fe717087 100644
--- a/include/llvm/TableGen/Record.h
+++ b/include/llvm/TableGen/Record.h
@@ -1394,6 +1394,7 @@ class Record {
DefInit *TheInit;
+ void init();
void checkName();
public:
diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp
index b12589b7e8..4f38e144d9 100644
--- a/lib/TableGen/Record.cpp
+++ b/lib/TableGen/Record.cpp
@@ -1684,6 +1684,10 @@ void RecordVal::print(raw_ostream &OS, bool PrintSem) const {
unsigned Record::LastID = 0;
+void Record::init() {
+ checkName();
+}
+
void Record::checkName() {
// Ensure the record name has string type.
const TypedInit *TypedName = dynamic_cast<const TypedInit *>(Name);