aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Object/Binary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Object/Binary.cpp')
-rw-r--r--lib/Object/Binary.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Object/Binary.cpp b/lib/Object/Binary.cpp
index 177c86c..fd9d3b4 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<Binary> 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<Binary> &Result) {