Skip to content

Commit

Permalink
[mlir] Use context provided rather than getContext
Browse files Browse the repository at this point in the history
Avoids "pass state was never initialized" assertion failure.
  • Loading branch information
jpienaar committed Jun 4, 2022
1 parent 03c066a commit 29794ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlir/test/lib/Tools/PDLL/TestPDLL.cpp
Expand Up @@ -29,7 +29,7 @@ struct TestPDLLPass : public PassWrapper<TestPDLLPass, OperationPass<>> {
LogicalResult initialize(MLIRContext *ctx) override {
// Build the pattern set within the `initialize` to avoid recompiling PDL
// patterns during each `runOnOperation` invocation.
RewritePatternSet patternList(&getContext());
RewritePatternSet patternList(ctx);
populateGeneratedPDLLPatterns(patternList);
patterns = std::move(patternList);
return success();
Expand Down

0 comments on commit 29794ab

Please sign in to comment.