Fix gcc warning by explicitly initializing the base class copy ctor (NFC)

Full diagnostic was:

warning: base class ‘class mlir::OptReductionBase<mlir::OptReductionPass>’ should be explicitly initialized in the copy constructor [-Wextra]
This commit is contained in:
Mehdi Amini 2020-08-30 17:45:41 +00:00
parent eb35ebb3a2
commit 719548d63d
1 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,8 @@ OptReductionPass::OptReductionPass(const Tester &test, MLIRContext *context,
: context(context), test(test), optPass(std::move(optPass)) {} : context(context), test(test), optPass(std::move(optPass)) {}
OptReductionPass::OptReductionPass(const OptReductionPass &srcPass) OptReductionPass::OptReductionPass(const OptReductionPass &srcPass)
: test(srcPass.test), optPass(srcPass.optPass.get()) {} : OptReductionBase<OptReductionPass>(srcPass), test(srcPass.test),
optPass(srcPass.optPass.get()) {}
/// Runs the pass instance in the pass pipeline. /// Runs the pass instance in the pass pipeline.
void OptReductionPass::runOnOperation() { void OptReductionPass::runOnOperation() {