[mlir] Add Adaptor alias
authorJacques Pienaar <jpienaar@google.com>
Fri, 12 Jun 2020 14:38:12 +0000 (07:38 -0700)
committerJacques Pienaar <jpienaar@google.com>
Fri, 12 Jun 2020 14:38:12 +0000 (07:38 -0700)
Summary:
Add Adaptor alias alongside OperandAdaptor to make next renaming more
mechanical. OperandAdaptor's are no longer just about operands.
Considered OpAdaptor too, but then noticed we'd mostly end up with
XOp::OpAdaptor which seems redundant.

Differential Revision: https://reviews.llvm.org/D81741

mlir/lib/TableGen/OpClass.cpp

index 43bbe24..c567c89 100644 (file)
@@ -228,6 +228,7 @@ void tblgen::OpClass::writeDeclTo(raw_ostream &os) const {
   os << "> {\npublic:\n";
   os << "  using Op::Op;\n";
   os << "  using OperandAdaptor = " << className << "OperandAdaptor;\n";
+  os << "  using Adaptor = " << className << "OperandAdaptor;\n";
 
   bool hasPrivateMethod = false;
   for (const auto &method : methods) {