diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-04-01 21:04:18 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-04-01 21:04:18 +0000 |
commit | 75ce62acefd0dd2ad56d081ca6551241b57a109f (patch) | |
tree | ae2cb55eeecffcce8228bcc16e55d0601651fe48 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | |
parent | a4d5fc3841637dc6651e07e8c6ce49e367aa4040 (diff) | |
download | bcm5719-llvm-75ce62acefd0dd2ad56d081ca6551241b57a109f.tar.gz bcm5719-llvm-75ce62acefd0dd2ad56d081ca6551241b57a109f.zip |
DwarfDebug: Prevent DebugLocEntry merging from coalescing two different
constants into only the first one.
rdar://14874886.
llvm-svn: 205357
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-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; } |