forked from OSchip/llvm-project
Pull duplicated build() in subclasses into root UnaryOp
PiperOrigin-RevId: 221326369
This commit is contained in:
parent
8659f3fa2c
commit
07b594de46
|
@ -162,4 +162,11 @@ class BinaryOp<string mnemonic, list<OpProperty> props> :
|
|||
|
||||
class UnaryOp<string mnemonic, list<OpProperty> props> :
|
||||
Op<mnemonic, props>, Operands<[Tensor]>, Results<[Tensor]> {
|
||||
let builder = [{
|
||||
static void build(Builder *builder, OperationState *result,
|
||||
SSAValue *arg) {
|
||||
result->addOperands({arg});
|
||||
result->types.push_back(arg->getType());
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue