diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-01 23:19:23 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-01 23:19:23 +0000 |
commit | 6fa9966ee6f22d4362cd8d022e07add21dd62d15 (patch) | |
tree | a31f30b121fcee18b0c9e91e2aa6ce4145fd9058 /llvm/lib/CodeGen | |
parent | ce749af25b8013c52123057c8ecab94b0238e1b7 (diff) | |
download | bcm5719-llvm-6fa9966ee6f22d4362cd8d022e07add21dd62d15.tar.gz bcm5719-llvm-6fa9966ee6f22d4362cd8d022e07add21dd62d15.zip |
DebugLocEntry: Actually merge the loc entry when returning true.
Seems we didn't have any test coverage for merging... awesome. So I
added some - but hit an llvm-objdump bug while I was there. I'm choosing
not to shave that yak right now.
Code review feedback/bug catch by Adrian Prantl in r205360.
llvm-svn: 205373
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h index 976edf0a2ab..0834b36013d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h +++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h @@ -95,7 +95,11 @@ public: } bool Merge(const DebugLocEntry &Next) { - return End == Next.Begin && hasSameValueOrLocation(Next); + if (End == Next.Begin && hasSameValueOrLocation(Next)) { + End = Next.End; + return true; + } + return false; } bool isLocation() const { return EntryKind == E_Location; } bool isInt() const { return EntryKind == E_Integer; } |