forked from OSchip/llvm-project
Fix the underlying cause for the asan test failure introduced by cl/210618122.
Restored the order of deleting then-clause before else-clause in if-statement destructor, since it does not and should not matter. PiperOrigin-RevId: 211273720
This commit is contained in:
parent
cedc28483f
commit
2d29d98df0
|
@ -108,6 +108,7 @@ public:
|
|||
other.removeFromCurrent();
|
||||
value = other.value;
|
||||
other.value = nullptr;
|
||||
other.back = nullptr;
|
||||
nextUse = nullptr;
|
||||
back = nullptr;
|
||||
insertIntoCurrent();
|
||||
|
|
|
@ -366,10 +366,11 @@ IfStmt::IfStmt(Location *location, unsigned numOperands, IntegerSet *set)
|
|||
}
|
||||
|
||||
IfStmt::~IfStmt() {
|
||||
delete thenClause;
|
||||
|
||||
if (elseClause)
|
||||
delete elseClause;
|
||||
|
||||
delete thenClause;
|
||||
// An IfStmt's IntegerSet 'set' should not be deleted since it is
|
||||
// allocated through MLIRContext's bump pointer allocator.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue