public:
/// Create a new Operation with the specific fields.
static Operation *create(Location location, OperationName name,
- ArrayRef<Value *> operands,
ArrayRef<Type> resultTypes,
+ ArrayRef<Value *> operands,
ArrayRef<NamedAttribute> attributes,
ArrayRef<Block *> successors, unsigned numRegions,
bool resizableOperandList);
/// Overload of create that takes an existing NamedAttributeList to avoid
/// unnecessarily uniquing a list of attributes.
static Operation *create(Location location, OperationName name,
- ArrayRef<Value *> operands,
ArrayRef<Type> resultTypes,
+ ArrayRef<Value *> operands,
const NamedAttributeList &attributes,
ArrayRef<Block *> successors, unsigned numRegions,
bool resizableOperandList);
/// Create a new Operation with the specific fields.
Operation *Operation::create(Location location, OperationName name,
- ArrayRef<Value *> operands,
ArrayRef<Type> resultTypes,
+ ArrayRef<Value *> operands,
ArrayRef<NamedAttribute> attributes,
ArrayRef<Block *> successors, unsigned numRegions,
bool resizableOperandList) {
- return create(location, name, operands, resultTypes,
+ return create(location, name, resultTypes, operands,
NamedAttributeList(attributes), successors, numRegions,
resizableOperandList);
}
/// Create a new Operation from operation state.
Operation *Operation::create(const OperationState &state) {
unsigned numRegions = state.regions.size();
- Operation *op = create(state.location, state.name, state.operands,
- state.types, state.attributes, state.successors,
+ Operation *op = create(state.location, state.name, state.types,
+ state.operands, state.attributes, state.successors,
numRegions, state.resizableOperandList);
for (unsigned i = 0; i < numRegions; ++i)
if (state.regions[i])
/// Overload of create that takes an existing NamedAttributeList to avoid
/// unnecessarily uniquing a list of attributes.
Operation *Operation::create(Location location, OperationName name,
- ArrayRef<Value *> operands,
ArrayRef<Type> resultTypes,
+ ArrayRef<Value *> operands,
const NamedAttributeList &attributes,
ArrayRef<Block *> successors, unsigned numRegions,
bool resizableOperandList) {
SmallVector<Type, 8> resultTypes(getResultTypes());
unsigned numRegions = getNumRegions();
auto *newOp =
- Operation::create(getLoc(), getName(), operands, resultTypes, attrs,
+ Operation::create(getLoc(), getName(), resultTypes, operands, attrs,
successors, numRegions, hasResizableOperandsList());
// Remember the mapping of any results.
// them.
auto name = OperationName("placeholder", getContext());
auto *op = Operation::create(
- getEncodedSourceLocation(loc), name, /*operands=*/{}, type,
+ getEncodedSourceLocation(loc), name, type, /*operands=*/{},
/*attributes=*/llvm::None, /*successors=*/{}, /*numRegions=*/0,
/*resizableOperandList=*/false);
forwardRefPlaceholders[op->getResult(0)] = loc;
ArrayRef<Value *> operands = llvm::None,
ArrayRef<Type> resultTypes = llvm::None) {
return Operation::create(
- UnknownLoc::get(context), OperationName("foo.bar", context), operands,
- resultTypes, llvm::None, llvm::None, 0, resizableOperands);
+ UnknownLoc::get(context), OperationName("foo.bar", context), resultTypes,
+ operands, llvm::None, llvm::None, 0, resizableOperands);
}
TEST(OperandStorageTest, NonResizable) {