Skip to content

Commit 0339abb

Browse files
committed
chore: check for rewriter type in the native call.
1 parent b2c7688 commit 0339abb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Tools/PDLL/Parser/Parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,7 @@ Parser::createNativeCall(SMRange loc, StringRef nativeFuncName,
31743174
if (failed(nativeFuncExpr))
31753175
return emitError(nativeFuncName + " not found.");
31763176

3177-
if (isa<mlir::pdll::ast::RewriteStmt>(*nativeFuncExpr))
3177+
if (!(*nativeFuncExpr)->getType().isa<ast::RewriteType>())
31783178
return emitError(nativeFuncName + " should be defined as a rewriter.");
31793179

31803180
FailureOr<ast::CallExpr *> nativeCall =

0 commit comments

Comments
 (0)