[all-commits] [llvm/llvm-project] 7c80c4: [MC] NFC. Avoid redundant copies when constructing...
Ilya Biryukov via All-commits
all-commits at lists.llvm.org
Thu Aug 11 02:54:09 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7c80c4d67716308dc0f382be88bbe73dd293892c
https://github.com/llvm/llvm-project/commit/7c80c4d67716308dc0f382be88bbe73dd293892c
Author: Ilya Biryukov <ibiryukov at google.com>
Date: 2022-08-11 (Thu, 11 Aug 2022)
Changed paths:
M llvm/lib/MC/MCParser/MasmParser.cpp
Log Message:
-----------
[MC] NFC. Avoid redundant copies when constructing StructFieldInfo
Follow-up after D131595, see comments in the review thread.
The intention of having two constructors was to minimize the copies of
`vector`, but a lack of `std::move` on the call site caused the wrong
constructor to be called.
Switched to a single constructor that accepts a value.
Accepting by value allows to have a single constructor and still decide
to copy or move on the call site.
More information about the All-commits
mailing list