diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index c8aa276b0ef..23ab7f0287f 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -117,11 +117,18 @@ public: /// labels are referenced is used to find debug_loc offset for a given DIE. bool isEmpty() const { return Begin == 0 && End == 0; } bool Merge(const DebugLocEntry &Next) { - if (!(Begin && Loc == Next.Loc && End == Next.Begin)) - return false; + if (Begin && + Loc == Next.Loc && + EntryKind == Next.EntryKind && + (!isInt() || getInt() == Next.getInt()) && + (!isConstantInt() || getConstantInt() == Next.getConstantInt()) && + (!isConstantFP() || getConstantFP() == Next.getConstantFP()) && + End == Next.Begin) { End = Next.End; return true; } + return false; + } bool isLocation() const { return EntryKind == E_Location; } bool isInt() const { return EntryKind == E_Integer; } bool isConstantFP() const { return EntryKind == E_ConstantFP; } |