Fix MSVC warning "comparison of integers of different signs" (NFC)
authorMehdi Amini <mehdi.amini@apple.com>
Fri, 1 Apr 2016 05:19:14 +0000 (05:19 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Fri, 1 Apr 2016 05:19:14 +0000 (05:19 +0000)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265110

llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp

index 6645045..d1cc1a0 100644 (file)
@@ -664,7 +664,7 @@ static bool openBitcodeFile(StringRef Path,
   // If we have a wrapper header, parse it and ignore the non-bc file contents.
   // The magic number is 0x0B17C0DE stored in little endian.
   if (isBitcodeWrapper(BufPtr, EndBufPtr)) {
-    if (EndBufPtr - BufPtr < BWH_HeaderSize)
+    if (MemBuf->getBufferSize() < BWH_HeaderSize)
       return Error("Invalid bitcode wrapper header");
 
     if (Dump) {