diff --git a/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp b/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp --- a/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp +++ b/mlir/unittests/Conversion/PDLToPDLInterp/RootOrderingTest.cpp @@ -33,6 +33,11 @@ createValues(); } + ~RootOrderingTest() { + for (int i = 0; i < 4; ++i) + v[i].getDefiningOp()->destroy(); + } + /// Creates the test values. void createValues() { OpBuilder builder(&context);