summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-11-15 21:22:02 +0000
committerRui Ueyama <ruiu@google.com>2013-11-15 21:22:02 +0000
commite448f9e418ffcec6fdadfc51af213f0d11645296 (patch)
tree44a130087d4fb54035ebfcbfc2f1059860b2132e /llvm/lib/Object
parent94f2271d6342ddda5812ae639e873a7913acdc83 (diff)
downloadbcm5719-llvm-e448f9e418ffcec6fdadfc51af213f0d11645296.tar.gz
bcm5719-llvm-e448f9e418ffcec6fdadfc51af213f0d11645296.zip
Path: Recognize COFF import library file magic.
Summary: Make identify_magic to recognize COFF import file. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2165 llvm-svn: 194852
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/Binary.cpp1
-rw-r--r--llvm/lib/Object/ObjectFile.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp
index d0a70091444..de57b4c9a74 100644
--- a/llvm/lib/Object/Binary.cpp
+++ b/llvm/lib/Object/Binary.cpp
@@ -91,6 +91,7 @@ error_code object::createBinary(MemoryBuffer *Source,
return object_error::success;
}
case sys::fs::file_magic::coff_object:
+ case sys::fs::file_magic::coff_import_library:
case sys::fs::file_magic::pecoff_executable: {
OwningPtr<Binary> ret(
ObjectFile::createCOFFObjectFile(scopedSource.take()));
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index 59395c640ff..0e626d650fb 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -69,6 +69,7 @@ ObjectFile *ObjectFile::createObjectFile(MemoryBuffer *Object) {
case sys::fs::file_magic::macho_dsym_companion:
return createMachOObjectFile(Object);
case sys::fs::file_magic::coff_object:
+ case sys::fs::file_magic::coff_import_library:
case sys::fs::file_magic::pecoff_executable:
return createCOFFObjectFile(Object);
}
OpenPOWER on IntegriCloud