diff --git a/lib/Object/Binary.cpp b/lib/Object/Binary.cpp index 177c86c5465..fd9d3b4bd75 100644 --- a/lib/Object/Binary.cpp +++ b/lib/Object/Binary.cpp @@ -75,7 +75,8 @@ error_code object::createBinary(MemoryBuffer *Source, case sys::fs::file_magic::macho_dynamically_linked_shared_lib: case sys::fs::file_magic::macho_dynamic_linker: case sys::fs::file_magic::macho_bundle: - case sys::fs::file_magic::macho_dynamically_linked_shared_lib_stub: { + case sys::fs::file_magic::macho_dynamically_linked_shared_lib_stub: + case sys::fs::file_magic::macho_dsym_companion: { OwningPtr ret( ObjectFile::createMachOObjectFile(scopedSource.take())); if (!ret) @@ -98,9 +99,13 @@ error_code object::createBinary(MemoryBuffer *Source, Result.swap(ret); return object_error::success; } - default: // Unrecognized object file format. + case sys::fs::file_magic::unknown: + case sys::fs::file_magic::bitcode: { + // Unrecognized object file format. return object_error::invalid_file_type; + } } + llvm_unreachable("Unexpected Binary File Type"); } error_code object::createBinary(StringRef Path, OwningPtr &Result) {