diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -865,11 +865,12 @@ // Read each export table entry, ordered by ordinal instead of by name. for (const auto &entry : m_binary->export_directories()) { llvm::StringRef sym_name; - if (auto err = entry.getSymbolName(sym_name)) { + if (auto err = std::move(entry.getSymbolName(sym_name))) { LLDB_LOG(log, "ObjectFilePECOFF::AppendFromExportTable - failed to get export " "table entry name: {0}", llvm::fmt_consume(std::move(err))); + llvm::consumeError(std::move(err)); continue; } Symbol symbol; @@ -886,11 +887,12 @@ // Forwarder exports are redirected by the loader transparently, but keep // it in symtab and make a note using the symbol name. llvm::StringRef forwarder_name; - if (auto err = entry.getForwardTo(forwarder_name)) { + if (auto err = std::move(entry.getForwardTo(forwarder_name))) { LLDB_LOG(log, "ObjectFilePECOFF::AppendFromExportTable - failed to get " "forwarder name of forwarder export '{0}': {1}", sym_name, llvm::fmt_consume(std::move(err))); + llvm::consumeError(std::move(err)); continue; } llvm::SmallString<256> new_name = {symbol.GetDisplayName().GetStringRef(), @@ -901,11 +903,12 @@ } uint32_t function_rva; - if (auto err = entry.getExportRVA(function_rva)) { + if (auto err = std::move(entry.getExportRVA(function_rva))) { LLDB_LOG(log, "ObjectFilePECOFF::AppendFromExportTable - failed to get " "address of export entry '{0}': {1}", sym_name, llvm::fmt_consume(std::move(err))); + llvm::consumeError(std::move(err)); continue; } // Skip the symbol if it doesn't look valid.