summaryrefslogtreecommitdiff
path: root/lib/TableGen/Record.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-10-19 13:04:13 +0000
committerDavid Greene <greened@obbligato.org>2011-10-19 13:04:13 +0000
commite338565757bfcfe9d762751c976684f66954fb45 (patch)
tree53efedeb81f0056894aa09af2c241dd0cf291d19 /lib/TableGen/Record.cpp
parent22dde7e655b76f75bf11e86129410a7dcbfac3ba (diff)
downloadllvm-e338565757bfcfe9d762751c976684f66954fb45.tar.gz
llvm-e338565757bfcfe9d762751c976684f66954fb45.tar.bz2
llvm-e338565757bfcfe9d762751c976684f66954fb45.tar.xz
Add NAME Member
Add a Value named "NAME" to each Record. This will be set to the def or defm name when instantiating multiclasses. This will replace the #NAME# processing hack once paste functionality is in place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/Record.cpp')
-rw-r--r--lib/TableGen/Record.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp
index a22c80c5e2..92559d15b5 100644
--- a/lib/TableGen/Record.cpp
+++ b/lib/TableGen/Record.cpp
@@ -1686,6 +1686,11 @@ unsigned Record::LastID = 0;
void Record::init() {
checkName();
+
+ // Every record potentially has a def at the top. This value is
+ // replaced with the top-level def name at instantiation time.
+ RecordVal DN("NAME", StringRecTy::get(), 0);
+ addValue(DN);
}
void Record::checkName() {