[Lldb-commits] [lldb] [lldb] Fix missing comsumeError() with LLDB_LOG in ObjectFileCOFF/PECOFF (PR #70793)
Stefan Gränitz via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 1 03:55:44 PDT 2023
================
@@ -271,9 +271,9 @@ void ObjectFileCOFF::ParseSymtab(lldb_private::Symtab &symtab) {
const auto COFFSymRef = m_object->getCOFFSymbol(SymRef);
Expected<StringRef> NameOrErr = SymRef.getName();
- if (auto error = NameOrErr.takeError()) {
- LLDB_LOG(log, "ObjectFileCOFF: failed to get symbol name: {0}",
- llvm::fmt_consume(std::move(error)));
+ if (!NameOrErr) {
+ LLDB_LOG_ERROR(log, NameOrErr.takeError(),
+ "ObjectFileCOFF: failed to get symbol name: {0}");
----------------
weliveindetail wrote:
Hey Ismail! Right, this seems unconventional compared to other logging code in LLDB. It's not something that changed when moving from `LLDB_LOG` to `LLDB_LOG_ERROR` though. We should keep printing the same info, but I agree that this is worth fixing while I am here.
https://github.com/llvm/llvm-project/pull/70793
More information about the lldb-commits
mailing list