summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
index 6645045db8f..d1cc1a02778 100644
--- a/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
+++ b/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
@@ -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) {
OpenPOWER on IntegriCloud