forked from OSchip/llvm-project
Reinstantiate old/bad deduplication logic that was removed in r315279.
While this shouldn't be necessary anymore, we have cases where we run into the assertion below, i.e. cases with two non-fragment entries for the same variable at different frame indices. This should be fixed, but for now, we should revert to a version that does not trigger asserts. llvm-svn: 315576
This commit is contained in:
parent
f5f204679b
commit
4d93120273
|
@ -233,6 +233,16 @@ void DbgVariable::addMMIEntry(const DbgVariable &V) {
|
|||
assert(!FrameIndexExprs.empty() && "Expected an MMI entry");
|
||||
assert(!V.FrameIndexExprs.empty() && "Expected an MMI entry");
|
||||
|
||||
// FIXME: This logic should not be necessary anymore, as we now have proper
|
||||
// deduplication. However, without it, we currently run into the assertion
|
||||
// below, which means that we are likely dealing with broken input, i.e. two
|
||||
// non-fragment entries for the same variable at different frame indices.
|
||||
if (FrameIndexExprs.size()) {
|
||||
auto *Expr = FrameIndexExprs.back().Expr;
|
||||
if (!Expr || !Expr->isFragment())
|
||||
return;
|
||||
}
|
||||
|
||||
for (const auto &FIE : V.FrameIndexExprs)
|
||||
// Ignore duplicate entries.
|
||||
if (llvm::none_of(FrameIndexExprs, [&](const FrameIndexExpr &Other) {
|
||||
|
|
Loading…
Reference in New Issue