aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit8a631b2cbe2f8621eb3679a4898205da577453b7 (patch)
tree54ce815755814be364f60b3263be96586ba52112 /lib/Object
parent0cbdb81de76274c3f1731d92dc09864d2277d690 (diff)
downloadexternal_llvm-8a631b2cbe2f8621eb3679a4898205da577453b7.zip
external_llvm-8a631b2cbe2f8621eb3679a4898205da577453b7.tar.gz
external_llvm-8a631b2cbe2f8621eb3679a4898205da577453b7.tar.bz2
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r--lib/Object/Binary.cpp1
-rw-r--r--lib/Object/ObjectFile.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/Object/Binary.cpp b/lib/Object/Binary.cpp
index d0a7009..de57b4c 100644
--- a/lib/Object/Binary.cpp
+++ b/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/lib/Object/ObjectFile.cpp b/lib/Object/ObjectFile.cpp
index 59395c6..0e626d6 100644
--- a/lib/Object/ObjectFile.cpp
+++ b/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);
}