diff --git a/lib/MetaProcessor/InputValidator.cpp b/lib/MetaProcessor/InputValidator.cpp index 544ecb4b..5be64ef7 100644 --- a/lib/MetaProcessor/InputValidator.cpp +++ b/lib/MetaProcessor/InputValidator.cpp @@ -20,7 +20,8 @@ namespace cling { m_Input.append(line); - llvm::MemoryBuffer* MB = llvm::MemoryBuffer::getMemBuffer(line); + llvm::OwningPtr MB; + MB.reset(llvm::MemoryBuffer::getMemBuffer(line)); Lexer RawLexer(SourceLocation(), LO, MB->getBufferStart(), MB->getBufferStart(), MB->getBufferEnd()); Token Tok;