[mlir][ODS] Fix copy ctor for generate Pass classes
authorVladislav Vinogradov <vlad.vinogradov@intel.com>
Tue, 15 Jun 2021 15:09:31 +0000 (18:09 +0300)
committerVladislav Vinogradov <vlad.vinogradov@intel.com>
Mon, 21 Jun 2021 11:07:31 +0000 (14:07 +0300)
commit628e136738823c3f69f4d0fb406c78f017009d1e
treec5a9a83eba19b2c2e8e214358e5c7a220626e8a1
parentb650778dc4acbab8a5415e743604a2a0afabea3d
[mlir][ODS] Fix copy ctor for generate Pass classes

Redirect the copy ctor to the actual class instead of
overwriting it with `TypeID` based ctor.

This allows the final Pass classes to have extra fields and logic for their copy.

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D104302
mlir/include/mlir/Pass/Pass.h
mlir/tools/mlir-tblgen/PassGen.cpp
mlir/unittests/TableGen/CMakeLists.txt
mlir/unittests/TableGen/PassGenTest.cpp [new file with mode: 0644]
mlir/unittests/TableGen/passes.td [new file with mode: 0644]