This new function is the same as LLVMParseIRInContext except it doesn't take ownership of the memory buffer. This fixes a wart that has been in place since 5ebb7b311223bcd21d2b3d25413d1edacefcc63d changed the underlying internal API to avoid taking ownership. Reduce nesting in the implementation of LLVMParseIRInContext (now LLVMParseIRInContext2) as well. Update examples, OCaml bindings, and tests including plugging some pre-existing memory leaks. OCaml bindings have renamed `parse_ir` to `parse_ir_bitcode_or_assembly` to provoke compilation failures in downstream code; this is intentional as this function now requires the memory buffer to be disposed by the caller.
This directory contains bindings for the LLVM compiler infrastructure to allow programs written in languages other than C or C++ to take advantage of the LLVM infrastructure--for instance, a self-hosted compiler front-end.