[mlir] Fix warning `missing base in copy ctor`

This suppresse annoying warning when building mlir.
```
 warning: base class ‘class mlir::PassWrapper<{anonymous}::TestStatisticPass,
  mlir::OperationPass<void> >’ should be explicitly initialized in the copy constructor [-Wextra]
```

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D126209
This commit is contained in:
Javed Absar 2022-05-23 14:48:57 +01:00
parent 089036444e
commit 8919447c71
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ struct TestOptionsPass
llvm::cl::desc("Example string option")};
};
TestOptionsPass() = default;
TestOptionsPass(const TestOptionsPass &) {}
TestOptionsPass(const TestOptionsPass &) : PassWrapper() {}
TestOptionsPass(const Options &options) {
listOption = options.listOption;
stringOption = options.stringOption;
@ -168,7 +168,7 @@ struct TestStatisticPass
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TestStatisticPass)
TestStatisticPass() = default;
TestStatisticPass(const TestStatisticPass &) {}
TestStatisticPass(const TestStatisticPass &) : PassWrapper() {}
StringRef getArgument() const final { return "test-stats-pass"; }
StringRef getDescription() const final { return "Test pass statistics"; }