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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-04-01 23:19:23 +00:00
parent 0afa71ea91
commit 132285a59c
2 changed files with 37 additions and 17 deletions

View File

@@ -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; }