[llvm] [TableGen] Use std::move instead of swap. NFC. (PR #81606)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 13:17:17 PST 2024
dwblaikie wrote:
> Historically TableGen has used `A.swap(B)` to move containers without the expense of copying them. Perhaps this predated rvalue references. In any case `A = std::move(B)` seems like a more direct way to implement this when only A is required after the operation.
That's certainly a throwback indeed - nice cleanup!
https://github.com/llvm/llvm-project/pull/81606
More information about the llvm-commits
mailing list