mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Fix a use-after-free in a DEBUG output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238242 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
e4af3b4160
commit
74f44b6c69
1 file changed
+4
-4
@@ -857,10 +857,6 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
|
||||
// Attempt to coalesce the ranges of two otherwise identical
|
||||
// DebugLocEntries.
|
||||
auto CurEntry = DebugLoc.rbegin();
|
||||
auto PrevEntry = std::next(CurEntry);
|
||||
if (PrevEntry != DebugLoc.rend() && PrevEntry->MergeRanges(*CurEntry))
|
||||
DebugLoc.pop_back();
|
||||
|
||||
DEBUG({
|
||||
dbgs() << CurEntry->getValues().size() << " Values:\n";
|
||||
for (auto Value : CurEntry->getValues()) {
|
||||
@@ -868,6 +864,10 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
|
||||
}
|
||||
dbgs() << "-----\n";
|
||||
});
|
||||
|
||||
auto PrevEntry = std::next(CurEntry);
|
||||
if (PrevEntry != DebugLoc.rend() && PrevEntry->MergeRanges(*CurEntry))
|
||||
DebugLoc.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user