diff options
Diffstat (limited to 'llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp')
-rw-r--r-- | llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp index 63145c087a6..24ebbc1cb80 100644 --- a/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp +++ b/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp @@ -483,13 +483,13 @@ static int AnalyzeBitcode() { MemoryBuffer::getFileOrSTDIN(InputFilename); if (std::error_code EC = MemBufOrErr.getError()) return Error("Error reading '" + InputFilename + "': " + EC.message()); - std::unique_ptr<MemoryBuffer> MemBuf = std::move(MemBufOrErr.get()); + MemoryBuffer &MemBuf = *MemBufOrErr.get(); - if (MemBuf->getBufferSize() & 3) + if (MemBuf.getBufferSize() & 3) return Error("Bitcode stream should be a multiple of 4 bytes in length"); - const unsigned char *BufPtr = (const unsigned char *)MemBuf->getBufferStart(); - const unsigned char *EndBufPtr = BufPtr+MemBuf->getBufferSize(); + const unsigned char *BufPtr = (const unsigned char *)MemBuf.getBufferStart(); + const unsigned char *EndBufPtr = BufPtr+MemBuf.getBufferSize(); // If we have a wrapper header, parse it and ignore the non-bc file contents. // The magic number is 0x0B17C0DE stored in little endian. |