.s files with `-g` generate __debug_aranges on darwin/arm64 for some
reason, and those lead to `nullptr` symbols. Don't crash on that.
Fixes PR50517.
Differential Revision: https://reviews.llvm.org/D103350
for (const InputFile *file : inputFiles) {
if (isa<ObjFile>(file))
for (Symbol *sym : file->symbols)
- if (auto *d = dyn_cast<Defined>(sym))
+ if (auto *d = dyn_cast_or_null<Defined>(sym))
addSym(*d);
}
_main:
callq "-[Foo doFoo:andBar:]"
ret
+
+.section __DWARF,__debug_aranges,regular,debug
+ltmp1:
+ .byte 0