diff options
author | Matthias Springer <me@m-sp.org> | 2023-10-04 08:35:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 08:35:40 +0200 |
commit | 8823e961f6a41854668d2dc1a1fc787cfa85ca43 (patch) | |
tree | 417945d9dbf0d9f70ed0f6e5b5498a76bf2d5ce0 /llvm/lib/Object/ObjectFile.cpp | |
parent | 3b34c117db175ae6a1404f7c07857c4aa6fc1ae3 (diff) | |
download | llvm-8823e961f6a41854668d2dc1a1fc787cfa85ca43.zip llvm-8823e961f6a41854668d2dc1a1fc787cfa85ca43.tar.gz llvm-8823e961f6a41854668d2dc1a1fc787cfa85ca43.tar.bz2 |
[mlir][ODS] Change `get...Mutable` to return `OpOperand &` for single operands (#66519)
The TableGen code generator now generates C++ code that returns a single
`OpOperand &` for `get...Mutable` of operands that are not variadic and
not optional. `OpOperand::set`/`assign` can be used to set a value (same
as `MutableOperandRange::assign`). This is safer than
`MutableOperandRange` because only single values (and no longer
`ValueRange`) can be assigned.
E.g.:
```
// Assignment of multiple values to non-variadic operand.
// Before: Compiles, but produces invalid op.
// After: Compilation error.
extractSliceOp.getSourceMutable().assign({v1, v2});
```
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions