[all-commits] [llvm/llvm-project] 0356ce: [DebugInfo] Change DWARFDebugAbbrev initialization
Alex via All-commits
all-commits at lists.llvm.org
Fri Jun 16 11:19:34 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0356ceedf2e90459597adfda19db2c52faf7aacd
https://github.com/llvm/llvm-project/commit/0356ceedf2e90459597adfda19db2c52faf7aacd
Author: Alex Langford <alangford at apple.com>
Date: 2023-06-16 (Fri, 16 Jun 2023)
Changed paths:
M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h
M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
M llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp
Log Message:
-----------
[DebugInfo] Change DWARFDebugAbbrev initialization
I plan on adding better error handling to DWARFDebugAbbrev, but first I
want us to be able to better reason about a state of a DWARFDebugAbbrev.
I want us to be able to initialize a DWARFDebugAbbrev in its complete
state instead of creating it and then calling an `extract` method
manually. If its Data field is populated, then parsing is not complete.
If Data is `std::nullopt`, then parsing is done and this section is
"finalized" in some sense.
Additionally, I have removed the `clear()` method. This makes sense for other
classes like DWARFAbbreviationDeclaration where we may want to re-use an object
repeatedly to avoid repeated initializations and allocations, but for
DWARFDebugAbbrev we pretty much create one and stick with it.
Differential Revision: https://reviews.llvm.org/D152947
More information about the All-commits
mailing list