mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Fix infinite loop in nested multiclasses.
Patch by Michael Liao! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152232 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1726,12 +1726,6 @@ void Record::setName(Init *NewName) {
|
||||
} // Otherwise this isn't yet registered.
|
||||
Name = NewName;
|
||||
checkName();
|
||||
// Since the Init for the name was changed, see if we can resolve
|
||||
// any of it using members of the Record.
|
||||
Init *ComputedName = Name->resolveReferences(*this, 0);
|
||||
if (ComputedName != Name) {
|
||||
setName(ComputedName);
|
||||
}
|
||||
// DO NOT resolve record values to the name at this point because
|
||||
// there might be default values for arguments of this def. Those
|
||||
// arguments might not have been resolved yet so we don't want to
|
||||
@@ -1754,6 +1748,8 @@ void Record::setName(const std::string &Name) {
|
||||
/// references.
|
||||
void Record::resolveReferencesTo(const RecordVal *RV) {
|
||||
for (unsigned i = 0, e = Values.size(); i != e; ++i) {
|
||||
if (RV == &Values[i]) // Skip resolve the same field as the given one
|
||||
continue;
|
||||
if (Init *V = Values[i].getValue())
|
||||
Values[i].setValue(V->resolveReferences(*this, RV));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user