[llvm] [ADT] Allow SmallVector move construction without move assignment (PR #219934)
lonely eagle via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 05:48:18 PDT 2026
linuxlonelyeagle wrote:
By the way, this piece of code is running pretty well now. Thanks a lot @joker-eph and I learned something.
```
/// Emit a remark about this operation for each message, reporting up to
/// any diagnostic handlers that may be listening.
SmallVector<InFlightDiagnostic>
Operation::emitRemark(const ArrayRef<Twine> messages) {
SmallVector<InFlightDiagnostic> diags;
for (size_t i = 0, e = messages.size(); i < e; ++i) {
InFlightDiagnostic diag = mlir::emitRemark(getLoc(), messages[i]);
if (i == e - 1 && getContext()->shouldPrintOpOnDiagnostic())
diag.attachNote(getLoc()) << "see current operation: " << *this;
diags.push_back(std::move(diag));
}
return diags;
}
```
https://github.com/llvm/llvm-project/pull/219934
More information about the llvm-commits
mailing list