[llvm-commits] [llvm] r142511 - /llvm/trunk/lib/TableGen/Record.cpp
David Greene
greened at obbligato.org
Wed Oct 19 06:03:30 PDT 2011
Author: greened
Date: Wed Oct 19 08:03:30 2011
New Revision: 142511
URL: http://llvm.org/viewvc/llvm-project?rev=142511&view=rev
Log:
Resolve Record Names
When resolving Record values, be sure to update the Record name as it
may contain references to the value.
Modified:
llvm/trunk/lib/TableGen/Record.cpp
Modified: llvm/trunk/lib/TableGen/Record.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/Record.cpp?rev=142511&r1=142510&r2=142511&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/Record.cpp (original)
+++ llvm/trunk/lib/TableGen/Record.cpp Wed Oct 19 08:03:30 2011
@@ -1764,6 +1764,12 @@
if (Init *V = Values[i].getValue())
Values[i].setValue(V->resolveReferences(*this, RV));
}
+ Init *OldName = getNameInit();
+ Init *NewName = Name->resolveReferences(*this, RV);
+ if (NewName != OldName) {
+ // Re-register with RecordKeeper.
+ setName(NewName);
+ }
}
void Record::dump() const { errs() << *this; }
More information about the llvm-commits
mailing list