mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
DebugInfo: Fix UserValue::match() in LiveDebugVariables after r235050
r235050 dropped the inlined-at field from `MDLocalVariable`, deferring to the `!dbg` attachments. Fix `UserValue` to take the `!dbg` into account when differentiating between variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235140 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -158,10 +158,10 @@ public:
|
||||
UserValue *getNext() const { return next; }
|
||||
|
||||
/// match - Does this UserValue match the parameters?
|
||||
bool match(const MDNode *Var, const MDNode *Expr, unsigned Offset,
|
||||
bool indirect) const {
|
||||
return Var == Variable && Expr == Expression && Offset == offset &&
|
||||
indirect == IsIndirect;
|
||||
bool match(const MDNode *Var, const MDNode *Expr, const MDLocation *IA,
|
||||
unsigned Offset, bool indirect) const {
|
||||
return Var == Variable && Expr == Expression && dl->getInlinedAt() == IA &&
|
||||
Offset == offset && indirect == IsIndirect;
|
||||
}
|
||||
|
||||
/// merge - Merge equivalence classes.
|
||||
@ -464,7 +464,7 @@ UserValue *LDVImpl::getUserValue(const MDNode *Var, const MDNode *Expr,
|
||||
UserValue *UV = Leader->getLeader();
|
||||
Leader = UV;
|
||||
for (; UV; UV = UV->getNext())
|
||||
if (UV->match(Var, Expr, Offset, IsIndirect))
|
||||
if (UV->match(Var, Expr, DL->getInlinedAt(), Offset, IsIndirect))
|
||||
return UV;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user