[PECOFF] Now that identify_magic() recognizes COFF import library.

No need to do that in ReaderCOFF.cpp.

llvm-svn: 195109
This commit is contained in:
Rui Ueyama 2013-11-19 06:29:57 +00:00
parent 03198d7cfa
commit 935c5eda6f
1 changed files with 1 additions and 6 deletions

View File

@ -758,7 +758,7 @@ public:
if (fileType == llvm::sys::fs::file_magic::windows_resource)
return convertAndParseResourceFile(mb, result);
if (isImportLibrary(magic))
if (fileType == llvm::sys::fs::file_magic::coff_import_library)
return lld::coff::parseCOFFImportLibrary(_context, mb, result);
return parseCOFFFile(mb, result);
}
@ -929,11 +929,6 @@ private:
return error_code::success();
}
static bool isImportLibrary(StringRef magic) {
return (magic[0] == 0 && magic[1] == 0 &&
magic[2] == (char)0xff && magic[3] == (char)0xff);
}
PECOFFLinkingContext &_PECOFFLinkingContext;
mutable BumpPtrStringSaver _stringSaver;
};