mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 08:24:12 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315576 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f41d23076e
commit
a7f8fe70ae
@ -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…
x
Reference in New Issue
Block a user