diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2020-01-14 14:06:12 +0100 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2020-01-14 14:06:37 +0100 |
| commit | df186507e1d07c3ddba091a076ba7a33dbdc5867 (patch) | |
| tree | 1a036220e7fe46703e2bc0840172068ddeffadc7 /mlir/test/lib/TestDialect | |
| parent | bff33bd5c83b947cccb4d6cf6ebca9dc021f716b (diff) | |
| download | bcm5719-llvm-df186507e1d07c3ddba091a076ba7a33dbdc5867.tar.gz bcm5719-llvm-df186507e1d07c3ddba091a076ba7a33dbdc5867.zip | |
Make helper functions static or move them into anonymous namespaces. NFC.
Diffstat (limited to 'mlir/test/lib/TestDialect')
| -rw-r--r-- | mlir/test/lib/TestDialect/TestPatterns.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/test/lib/TestDialect/TestPatterns.cpp b/mlir/test/lib/TestDialect/TestPatterns.cpp index 62ee89e0fe4..bbeb2c62761 100644 --- a/mlir/test/lib/TestDialect/TestPatterns.cpp +++ b/mlir/test/lib/TestDialect/TestPatterns.cpp @@ -21,7 +21,8 @@ static void createOpI(PatternRewriter &rewriter, Value input) { rewriter.create<OpI>(rewriter.getUnknownLoc(), input); } -void handleNoResultOp(PatternRewriter &rewriter, OpSymbolBindingNoResult op) { +static void handleNoResultOp(PatternRewriter &rewriter, + OpSymbolBindingNoResult op) { // Turn the no result op to a one-result op. rewriter.create<OpSymbolBindingB>(op.getLoc(), op.operand().getType(), op.operand()); @@ -56,6 +57,7 @@ static mlir::PassRegistration<TestPatternDriver> // ReturnType Driver. //===----------------------------------------------------------------------===// +namespace { struct ReturnTypeOpMatch : public RewritePattern { ReturnTypeOpMatch(MLIRContext *ctx) : RewritePattern(OpWithInferTypeInterfaceOp::getOperationName(), 1, ctx) { @@ -94,7 +96,6 @@ struct ReturnTypeOpMatch : public RewritePattern { } }; -namespace { struct TestReturnTypeDriver : public FunctionPass<TestReturnTypeDriver> { void runOnFunction() override { mlir::OwningRewritePatternList patterns; |

