lld/coff: slightly simplify ImportFile::parse()

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@363397 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/COFF/InputFiles.cpp b/COFF/InputFiles.cpp
index 0c48fc6..538a36e 100644
--- a/COFF/InputFiles.cpp
+++ b/COFF/InputFiles.cpp
@@ -728,11 +728,10 @@
 
 void ImportFile::parse() {
   const char *Buf = MB.getBufferStart();
-  const char *End = MB.getBufferEnd();
   const auto *Hdr = reinterpret_cast<const coff_import_header *>(Buf);
 
   // Check if the total size is valid.
-  if ((size_t)(End - Buf) != (sizeof(*Hdr) + Hdr->SizeOfData))
+  if (MB.getBufferSize() != sizeof(*Hdr) + Hdr->SizeOfData)
     fatal("broken import library");
 
   // Read names and create an __imp_ symbol.