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
7 lines
226 B
Plaintext
7 lines
226 B
Plaintext
# RUN: llc -filetype=obj -o %t.o %S/Inputs/main-ret-0.ll
|
|
# RUN: cp %t.o %t.a
|
|
# RUN: not llvm-jitlink -noexec %t.o %t.a
|
|
#
|
|
# Try to load an object file as if it were an archive. Should result in an
|
|
# error, rather than a crash.
|