[ORC] Use dyn_cast to check input type in StaticLibraryDefinitionGenerator.
Replaces an llvm::cast that assumed that all Binary instances were either Archive or MachOUniversalBinary instances with a dyn_cast. The cast was triggering an assert in StaticLibraryDefinitionGenerator::Load if that method was given a path or MemoryBuffer containing a relocatable object file. Switching to dyn_cast causes the operation to error out with a bad-format error as expected. Fixes rdar://119262300
parent
92fccea2
Please register or sign in to comment