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
This commit is contained in:
David Greene
2011-10-19 13:04:13 +00:00
parent 22dde7e655
commit e338565757
5 changed files with 16 additions and 2 deletions
+5
View File
@@ -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() {