Re-land "Migrate the rest of COFFObjectFile to Error"

This reverts commit 101fbc0138.

Remove leftover debugging attribute.

Update LLDB as well, which was missed before.
This commit is contained in:
Reid Kleckner
2020-06-11 13:00:54 -07:00
parent f44d2424f8
commit 1c03389c29
14 changed files with 347 additions and 356 deletions

View File

@@ -969,13 +969,12 @@ uint32_t ObjectFilePECOFF::ParseDependentModules() {
for (const auto &entry : COFFObj->import_directories()) {
llvm::StringRef dll_name;
auto ec = entry.getName(dll_name);
// Report a bogus entry.
if (ec != std::error_code()) {
if (llvm::Error e = entry.getName(dll_name)) {
LLDB_LOGF(log,
"ObjectFilePECOFF::ParseDependentModules() - failed to get "
"import directory entry name: %s",
ec.message().c_str());
llvm::toString(std::move(e)).c_str());
continue;
}