From cbb6f09ce8416e8752dffe17641400b547eb71ca Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sat, 7 Sep 2019 18:56:39 -0700 Subject: [PATCH] Use "final" instead of marking method virtual in override (NFC) This is the only example for overriding this interface in the repo, let's try to make it right as it may be taken as a reference when implemented in other dialects PiperOrigin-RevId: 267811123 --- mlir/test/lib/TestDialect/TestDialect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/test/lib/TestDialect/TestDialect.cpp b/mlir/test/lib/TestDialect/TestDialect.cpp index 08b69a3..ea550b2 100644 --- a/mlir/test/lib/TestDialect/TestDialect.cpp +++ b/mlir/test/lib/TestDialect/TestDialect.cpp @@ -34,7 +34,7 @@ struct TestOpFolderDialectInterface : public OpFolderDialectInterface { /// Registered hook to check if the given region, which is attached to an /// operation that is *not* isolated from above, should be used when /// materializing constants. - virtual bool shouldMaterializeInto(Region *region) const { + bool shouldMaterializeInto(Region *region) const final { // If this is a one region operation, then insert into it. return isa(region->getParentOp()); } -- 2.7.4