[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Wed May 8 14:33:07 PDT 2024


================
@@ -1411,3 +1414,35 @@ clang::Decl *
 ClangASTImporter::ASTImporterDelegate::GetOriginalDecl(clang::Decl *To) {
   return m_main.GetDeclOrigin(To).decl;
 }
+
+void ClangASTImporter::ASTImporterDelegate::UpdateImportProgress(
----------------
Michael137 wrote:

These asserts should never ever actually occur unless something about TypeSystemClang gets redesigned, at which point the intention was that these would flag in development builds/tests. But definitely valid question. For the cases where a `nullptr` would occur I did try to be consistent with early returns. I usually try to express the preconditions of the function in terms of asserts, but in this case I don't have strong opinion, I think doing an early return would make sense here. I remember some time last year @DavidSpickett proposed an assert macro that would fire in debug builds but early-return in release. Can't find that atm, not sure if it ever landed.

https://github.com/llvm/llvm-project/pull/91452


More information about the lldb-commits mailing list