[llvm] fix llvm-gsymutil verification (PR #141751)
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 09:43:56 PDT 2025
================
@@ -713,6 +713,10 @@ llvm::Error DwarfTransformer::verify(StringRef GsymPath,
OutputAggregator &Out) {
Out << "Verifying GSYM file \"" << GsymPath << "\":\n";
+ for (const auto &CU : DICtx.compile_units()) {
+ CU->clear();
+ }
+
----------------
clayborg wrote:
So if there is some state that wasn't cleared in the DWARFUnit objects (or DWARFCompileUnit objects) then we should be doing one of two things:
- Instead of calling `void DWARFUnit::clearDIEs(bool KeepCUDie, bool KeepDWODies = false);`, we call `DWARFUnit::clear()`. This should reset all of the state correctly and avoid the assertion
- in `void clearDIEs(bool KeepCUDie, bool KeepDWODies = false);` we should clear any state related to the DIEs that needs to be cleared.
https://github.com/llvm/llvm-project/pull/141751
More information about the llvm-commits
mailing list