[llvm-gsymutil] Fix assert failure on FileEntry.Dir empty (#79926)
Summary: FileEntry.Dir can be empty if debug info only contains relative path. This caused an assertion failure when gsym segmentation is trying to copy a file entry with empty dir. As the fitst entry of StringTable is always empty (and is preserved), `StringOffsetMap` doesn't have key 0. Hence, `find(0)` returns `End` and `operator->()` fails the assertion Test Plan: ./bin/llvm-lit -sv llvm/test/tools/llvm-gsymutil/X86/elf-empty-dir.yaml
Loading
Please sign in to comment