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)
commit5ebb7b311223bcd21d2b3d25413d1edacefcc63d
treeacd3732ac3d49c105b8fd588f2f46603f4993d2e
parent493f91b6dedaf5dfb636b10dc30eb2b0d8cb2ff4
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.

llvm-svn: 211861
llvm/include/llvm/IRReader/IRReader.h
llvm/lib/AsmParser/Parser.cpp
llvm/lib/IRReader/IRReader.cpp