From: David Greene Date: Wed, 19 Oct 2011 13:02:45 +0000 (+0000) Subject: Add Record Init X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f7931b7040de1c829e678b4e391308bc3376f8a0;p=oota-llvm.git Add Record Init Add an init function to be shared among Record constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142501 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h index 0c9c909972c..55fe717087a 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 b12589b7e8d..4f38e144d94 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(Name);