I could not find a test for --summarize-types, this change adds one.
Details
Diff Detail
Event Timeline
I'm not sure what you mean that this feature isn't tested - a quick search through llvm/test seems to indicate a test case here: llvm/test/DebugInfo/dwarfdump-type-units.test:RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-type-units.elf-x86-64 -summarize-types | FileCheck -check-prefix=CHECK -check-prefix=SHORT %s - is this test inadequate?
Good catch dblaikie, I missed that test and it covers almost all I was testing here. This updated revision adds a check that I think was missing from the existing test.
Maybe adding -implicit-check-not=DW_TAG (or even -implicit-check-not=DW_ maybe) to the short FileCheck invocation would be suitable?
Using -implicit-check-not=DW_TAG fails due to finding the string output in other sections, I think the explicit check might be required.
Perhaps the summarize-types test could be changed to only dump -debug-types (passing that arg instead of -v to the llvm-dwarfdump invocation) & then it could use -implicit-check-not=DW_?
As suggested by dblaikie, now the call with summarize-types dumps -debug-types and not the other sections. To keep the useful check of the type_signature value it has been changed to the LONG prefix check.