diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2017-05-30 19:36:58 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2017-05-30 19:36:58 +0000 |
commit | 14ea122e6ee126b025fa1cf8d2439944c64e5ae6 (patch) | |
tree | 5d447d6f16d86ad6f416dfcbaddd6d3a9d6aaf0d /llvm/lib/Object/WindowsResource.cpp | |
parent | 87aefe9042e1c78840d16aa2de5ba8c8a6dc8e61 (diff) | |
download | bcm5719-llvm-14ea122e6ee126b025fa1cf8d2439944c64e5ae6.tar.gz bcm5719-llvm-14ea122e6ee126b025fa1cf8d2439944c64e5ae6.zip |
[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
Diffstat (limited to 'llvm/lib/Object/WindowsResource.cpp')
-rw-r--r-- | llvm/lib/Object/WindowsResource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/WindowsResource.cpp b/llvm/lib/Object/WindowsResource.cpp index 9dea5539858..c1adb26bd3d 100644 --- a/llvm/lib/Object/WindowsResource.cpp +++ b/llvm/lib/Object/WindowsResource.cpp @@ -20,7 +20,7 @@ namespace object { #define RETURN_IF_ERROR(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); |