[llvm] r274085 - [Object] Fix a -Wpessimizing-move error; clang-format; NFC
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 17:37:13 PDT 2016
Author: vedantk
Date: Tue Jun 28 19:37:13 2016
New Revision: 274085
URL: http://llvm.org/viewvc/llvm-project?rev=274085&view=rev
Log:
[Object] Fix a -Wpessimizing-move error; clang-format; NFC
Modified:
llvm/trunk/lib/Object/MachOUniversal.cpp
Modified: llvm/trunk/lib/Object/MachOUniversal.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOUniversal.cpp?rev=274085&r1=274084&r2=274085&view=diff
==============================================================================
--- llvm/trunk/lib/Object/MachOUniversal.cpp (original)
+++ llvm/trunk/lib/Object/MachOUniversal.cpp Tue Jun 28 19:37:13 2016
@@ -123,7 +123,8 @@ MachOUniversalBinary::MachOUniversalBina
}
// Check for magic value and sufficient header size.
StringRef Buf = getData();
- MachO::fat_header H= getUniversalBinaryStruct<MachO::fat_header>(Buf.begin());
+ MachO::fat_header H =
+ getUniversalBinaryStruct<MachO::fat_header>(Buf.begin());
Magic = H.magic;
NumberOfObjects = H.nfat_arch;
uint32_t MinSize = sizeof(MachO::fat_header);
@@ -147,15 +148,17 @@ MachOUniversalBinary::MachOUniversalBina
Expected<std::unique_ptr<MachOObjectFile>>
MachOUniversalBinary::getObjectForArch(StringRef ArchName) const {
if (Triple(ArchName).getArch() == Triple::ArchType::UnknownArch)
- return make_error<GenericBinaryError>(std::move("Unknown architecture "
- "named: " + ArchName),
+ return make_error<GenericBinaryError>("Unknown architecture "
+ "named: " +
+ ArchName,
object_error::arch_not_found);
for (object_iterator I = begin_objects(), E = end_objects(); I != E; ++I) {
if (I->getArchTypeName() == ArchName)
return I->getAsObjectFile();
}
- return make_error<GenericBinaryError>(std::move("fat file does not "
- "contain " + ArchName),
+ return make_error<GenericBinaryError>("fat file does not "
+ "contain " +
+ ArchName,
object_error::arch_not_found);
}
More information about the llvm-commits
mailing list