[PATCH] D58837: [ELF] Fix GCC8 warnings about "fall through", NFCI
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 2 03:21:53 PST 2019
MaskRay added a comment.
In D58837#1416042 <https://reviews.llvm.org/D58837#1416042>, @Hahnfeld wrote:
> In D58837#1416035 <https://reviews.llvm.org/D58837#1416035>, @MaskRay wrote:
>
> > `getDynamicTagAsString` is used by `llvm-objdump` and it'd be better if `llvm-objdump` can parse some malformed binaries (with bad `.dynsym`). If the tag is unknown, falling back to the default label (`return "<unknown:>0x"...`) may make more sense.
>
>
> I think we could just add a `break` and handle that case in the generic `switch` below. But I think you're right, the current patch would break for Hexagon, MIPS and PPC64. I tested with assertions enabled, but maybe there is no test case exercising this code path?
Yes. For this patch using `break;` should be good enough. There may not be tests for such corrupted binaries.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58837/new/
https://reviews.llvm.org/D58837
More information about the llvm-commits
mailing list