[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu May 9 00:18:06 PDT 2024
================
@@ -1411,3 +1414,35 @@ clang::Decl *
ClangASTImporter::ASTImporterDelegate::GetOriginalDecl(clang::Decl *To) {
return m_main.GetDeclOrigin(To).decl;
}
+
+void ClangASTImporter::ASTImporterDelegate::UpdateImportProgress(
----------------
labath wrote:
> cast nullptr to a NamedDecl (which will give you nullptr)
Actually, `dyn_cast` will abort if it gets a null pointer (`dyn_cast_or_null` is the version that forwards nullness) -- which makes this assert unnecessary. However, I think this is a very good example of an `assert` -- checking for things that "should not happen" without introducing overhead in the production codepath.
https://github.com/llvm/llvm-project/pull/91452
More information about the lldb-commits
mailing list