From 7bb480dbc274c74fb2ede464e3a1849c18fbfc8c Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Thu, 16 Apr 2015 22:27:54 +0000 Subject: 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. llvm-svn: 235140 --- llvm/lib/CodeGen/LiveDebugVariables.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 52532b1495a..c2993db6c5a 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -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; } -- cgit v1.2.3