llvm.org GIT mirror llvm / 3cb7bf5
[Object] Fix a -Wpessimizing-move error; clang-format; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274085 91177308-0d34-0410-b5e6-96231b3b80d8 Vedant Kumar 3 years ago
1 changed file(s) with 8 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
122122 }
123123 // Check for magic value and sufficient header size.
124124 StringRef Buf = getData();
125 MachO::fat_header H= getUniversalBinaryStruct(Buf.begin());
125 MachO::fat_header H =
126 getUniversalBinaryStruct(Buf.begin());
126127 Magic = H.magic;
127128 NumberOfObjects = H.nfat_arch;
128129 uint32_t MinSize = sizeof(MachO::fat_header);
146147 Expected>
147148 MachOUniversalBinary::getObjectForArch(StringRef ArchName) const {
148149 if (Triple(ArchName).getArch() == Triple::ArchType::UnknownArch)
149 return make_error(std::move("Unknown architecture "
150 "named: " + ArchName),
150 return make_error("Unknown architecture "
151 "named: " +
152 ArchName,
151153 object_error::arch_not_found);
152154
153155 for (object_iterator I = begin_objects(), E = end_objects(); I != E; ++I) {
154156 if (I->getArchTypeName() == ArchName)
155157 return I->getAsObjectFile();
156158 }
157 return make_error(std::move("fat file does not "
158 "contain " + ArchName),
159 return make_error("fat file does not "
160 "contain " +
161 ArchName,
159162 object_error::arch_not_found);
160163 }