File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,8 @@ void testParsePassPipeline() {
189
189
mlirPrintPassPipeline (mlirPassManagerGetAsOpPassManager (pm ), printToStderr ,
190
190
NULL );
191
191
fprintf (stderr , "\n" );
192
+ mlirPassManagerDestroy (pm );
193
+ mlirContextDestroy (ctx );
192
194
}
193
195
194
196
int main () {
Original file line number Diff line number Diff line change 6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
+ #include " mlir/IR/OwningOpRef.h"
9
10
#include " mlir/IR/PatternMatch.h"
10
11
#include " mlir/Rewrite/PatternApplicator.h"
11
12
#include " gtest/gtest.h"
@@ -20,7 +21,7 @@ TEST(PatternBenefitTest, BenefitOrder) {
20
21
MLIRContext context;
21
22
22
23
OpBuilder builder (&context);
23
- auto module = ModuleOp::create (builder.getUnknownLoc ());
24
+ OwningOpRef<ModuleOp> module = ModuleOp::create (builder.getUnknownLoc ());
24
25
25
26
struct Pattern1 : public OpRewritePattern <ModuleOp> {
26
27
Pattern1 (mlir::MLIRContext *context, bool *called)
@@ -71,7 +72,7 @@ TEST(PatternBenefitTest, BenefitOrder) {
71
72
};
72
73
73
74
MyPatternRewriter rewriter (&context);
74
- (void )pa.matchAndRewrite(module , rewriter);
75
+ (void )pa.matchAndRewrite(* module , rewriter);
75
76
76
77
EXPECT_TRUE (called1);
77
78
EXPECT_TRUE (called2);
You can’t perform that action at this time.
0 commit comments