[llvm-commits] [llvm] r142501 - in /llvm/trunk: include/llvm/TableGen/Record.h lib/TableGen/Record.cpp
David Greene
greened at obbligato.org
Wed Oct 19 06:02:45 PDT 2011
Author: greened
Date: Wed Oct 19 08:02:45 2011
New Revision: 142501
URL: http://llvm.org/viewvc/llvm-project?rev=142501&view=rev
Log:
Add Record Init
Add an init function to be shared among Record constructors.
Modified:
llvm/trunk/include/llvm/TableGen/Record.h
llvm/trunk/lib/TableGen/Record.cpp
Modified: llvm/trunk/include/llvm/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TableGen/Record.h?rev=142501&r1=142500&r2=142501&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TableGen/Record.h (original)
+++ llvm/trunk/include/llvm/TableGen/Record.h Wed Oct 19 08:02:45 2011
@@ -1394,6 +1394,7 @@
DefInit *TheInit;
+ void init();
void checkName();
public:
Modified: llvm/trunk/lib/TableGen/Record.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/Record.cpp?rev=142501&r1=142500&r2=142501&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/Record.cpp (original)
+++ llvm/trunk/lib/TableGen/Record.cpp Wed Oct 19 08:02:45 2011
@@ -1684,6 +1684,10 @@
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);
More information about the llvm-commits
mailing list