From d3a85cc77dfdc3f42f80ed6eb10d45e6fac981e7 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Mon, 8 Jul 2019 11:17:40 -0700 Subject: [PATCH] NFC: Add AbstractOperation as a friend of 'Op'. This allows for accessing the hidden overload of 'Op::hasTrait'. PiperOrigin-RevId: 257018255 --- mlir/include/mlir/IR/OpDefinition.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h index c98a85fa26b0..70cd9b41ebb8 100644 --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -897,6 +897,9 @@ private: return llvm::is_contained(llvm::makeArrayRef({ClassID::getID()...}), traitID); } + + /// Allow access to 'hasTrait'. + friend AbstractOperation; }; // These functions are out-of-line implementations of the methods in BinaryOp,