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
This commit is contained in:
Mehdi Amini
2019-09-07 18:56:39 -07:00
committed by A. Unique TensorFlower
parent 6443583bfd
commit cbb6f09ce8

View File

@@ -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<OneRegionOp>(region->getParentOp());
}