[PATCH] D38719: [llvm-dwarfdump] Verify compatible TAG for attributes.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 10:03:39 PDT 2017



> On Oct 11, 2017, at 9:45 AM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> Adrian - could you take a look here & see why DWARFVerifier::handleDebugInfo is creating empty TUSection/CUSection, rather than passing the DCtx's populated sections in? (that's my rough reading of the code, at least)

It looks like this was introduced by https://reviews.llvm.org/D35521

"This patch modifies the handleDebugInfo() function so that we verify the contents of each unit
in the .debug_info section only if its header has been successfully verified."

So it looks like the code is trying to avoid parsing the unit if the header didn't verify? At the first glance this does look bit redundant to me but I didn't give it a thorough reading.

Jonas, can you make sense of it in the context of that commit? I would not be surprised if this is just compensating for a missing feature in the codebase at that point in time.

If we can get away with deleting the redundant code that would definitely be a win.

-- adrian


More information about the llvm-commits mailing list