ParseIR: don't take ownership of the MemoryBuffer
authorAlp Toker <alp@nuanti.com>
Fri, 27 Jun 2014 04:33:58 +0000 (04:33 +0000)
committerAlp Toker <alp@nuanti.com>
Fri, 27 Jun 2014 04:33:58 +0000 (04:33 +0000)
commitd0996e5b33ede018999044f3c5f05e72540d97c4
treec78a4ab783abfeb12368e4dfbf0f3b122ad89fde
parent493512898faad01ed17c988f422a644e6fe83264
ParseIR: don't take ownership of the MemoryBuffer

clang was needlessly duplicating whole memory buffer contents in an attempt to
satisfy unclear ownership semantics. Let's just hide internal LLVM quirks and
present a simple non-owning interface.

The public C API preserves previous behaviour for stability.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211861 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IRReader/IRReader.h
lib/AsmParser/Parser.cpp
lib/IRReader/IRReader.cpp