[llvm] [DebugInfo] Add fast path for parsing DW_TAG_compile_unit abbrevs (PR #108757)
Alex Langford via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 10:51:07 PDT 2024
================
@@ -1051,6 +1051,17 @@ DWARFUnit::getLastChildEntry(const DWARFDebugInfoEntry *Die) const {
return nullptr;
}
+const DWARFAbbreviationDeclaration *DWARFUnit::tryExtractCUAbbrevFast() const {
+ Expected<const DWARFAbbreviationDeclaration *> AbbrevOrError =
+ Abbrev->tryExtractCUAbbrevFast(getAbbreviationsOffset());
+ if (!AbbrevOrError) {
+ // FIXME: We should propagate this error upwards.
----------------
bulbazord wrote:
Why not have this return an `Expected` as well? You added this function so you get to decide how its used, no?
https://github.com/llvm/llvm-project/pull/108757
More information about the llvm-commits
mailing list