mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Resolve Record Names
When resolving Record values, be sure to update the Record name as it may contain references to the value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142511 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f628204262
commit
9c42bcf2ca
@ -1764,6 +1764,12 @@ void Record::resolveReferencesTo(const RecordVal *RV) {
|
||||
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; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user