[COFF] Fix crash when emitting symbol tables with GC
When running with linker GC (`-opt:ref`), defined imported symbols that are referenced but then dropped by GC end up with their `Location` member being nullptr, which means `getChunk()` returns nullptr for them and attempting to call `getChunk()->getOutputSection()` causes a crash from the nullptr dereference. Check for `getChunk()` being nullptr and bail out early to avoid the crash. Differential Revision: https://reviews.llvm.org/D48092 llvm-svn: 334548
Loading
Please register or sign in to comment