Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ bool ClangExpressionSourceCode::GetText(
*sc.comp_unit, modules_for_macros))
LLDB_LOG_ERROR(
GetLog(LLDBLog::Expressions), std::move(err),
"Error while loading hand-imported modules: {0}");
"Error while loading hand-imported modules:\n{0}");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,13 @@ llvm::Error ClangModulesDeclVendorImpl::AddModulesForCompileUnit(
if (!LanguageSupportsClangModules(cu.GetLanguage()))
return llvm::Error::success();

llvm::Error errors = llvm::Error::success();

for (auto &imported_module : cu.GetImportedModules())
// TODO: don't short-circuit. Continue loading modules even if one of them
// fails. Concatenate all the errors.
if (auto err = AddModule(imported_module, &exported_modules))
return err;
errors = llvm::joinErrors(std::move(errors), std::move(err));

return llvm::Error::success();
return errors;
}

// ClangImporter::lookupValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,10 @@ static void SetupDeclVendor(ExecutionContext &exe_ctx, Target *target,

// FIXME: should we be dumping these to the error log instead of as
// diagnostics? They are non-fatal and are usually quite noisy.
diagnostic_manager.PutString(lldb::eSeverityInfo,
llvm::toString(std::move(err)));
llvm::handleAllErrors(
std::move(err), [&diagnostic_manager](const llvm::StringError &e) {
diagnostic_manager.PutString(lldb::eSeverityInfo, e.getMessage());
});
}

ClangExpressionSourceCode::WrapKind ClangUserExpression::GetWrapKind() const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ run
expr blah

# CHECK: note: couldn't find module search path directory {{.*}}sources
## FIXME: We never attempted to load bar.
# CHECK-NOT: couldn't find module search path
# CHECK: note: couldn't find module search path directory {{.*}}sources
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ expr blah
# CHECK: note: couldn't load top-level module foo
## FIXME: clang error diagnostic shouldn't be dumped to the console.
# CHECK: error:
## FIXME: We never attempted to load bar.
# CHECK-NOT: bar
# CHECK: note: couldn't load top-level module bar
## FIXME: clang error diagnostic shouldn't be dumped to the console.
# CHECK: error:
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ run
expr blah

# CHECK: note: failed to parse and load modulemap file in {{.*}}sources
## FIXME: We never attempted to load bar.
# CHECK-NOT: failed to parse and load modulemap
# CHECK: note: failed to parse and load modulemap file in {{.*}}sources
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ run
expr blah

# CHECK: note: header search couldn't locate module 'foo'
## FIXME: We never attempted to load bar.
# CHECK-NOT: bar
# CHECK: note: header search couldn't locate module 'bar'
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ run
expr blah

# CHECK: note: couldn't find modulemap file in {{.*}}sources
## FIXME: We never attempted to load bar.
# CHECK-NOT: couldn't find modulemap
# CHECK: note: couldn't find modulemap file in {{.*}}sources
Loading