forked from OSchip/llvm-project
[Object] Fix pessimizing move.
Returning the Error by value triggers copy elision, the move is more expensive. Clang rightfully warns about it. llvm-svn: 304232
This commit is contained in:
parent
87aefe9042
commit
14ea122e6e
|
@ -20,7 +20,7 @@ namespace object {
|
||||||
|
|
||||||
#define RETURN_IF_ERROR(X) \
|
#define RETURN_IF_ERROR(X) \
|
||||||
if (auto EC = X) \
|
if (auto EC = X) \
|
||||||
return std::move(EC);
|
return EC;
|
||||||
|
|
||||||
const uint32_t MIN_HEADER_SIZE = 7 * sizeof(uint32_t) + 2 * sizeof(uint16_t);
|
const uint32_t MIN_HEADER_SIZE = 7 * sizeof(uint32_t) + 2 * sizeof(uint16_t);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue