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 | ccd539282b4433bf4d3fca0e23b33799966cdbc0 (patch) | |
tree | fcaeb66b9b84fbd04e70aac0f6f1e3a2afb2da44 /lib/CodeGen | |
parent | 4a6c0afc523716ab6d290ee5eb1b050948a489a7 (diff) | |
download | llvm-ccd539282b4433bf4d3fca0e23b33799966cdbc0.tar.gz llvm-ccd539282b4433bf4d3fca0e23b33799966cdbc0.tar.bz2 llvm-ccd539282b4433bf4d3fca0e23b33799966cdbc0.tar.xz |
DwarfDebug: Prevent DebugLocEntry merging from coalescing two different
constants into only the first one.
rdar://14874886.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index c8aa276b0e..23ab7f0287 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/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; } |