mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
Pass a std::unique_ptr<MemoryBuffer>& to getLazyBitcodeModule.
By taking a reference we can do the ownership transfer in one place instead of expecting every caller to do it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216492 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "llvm/Support/ErrorOr.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace llvm {
|
||||
@@ -29,7 +30,7 @@ namespace llvm {
|
||||
/// Read the header of the specified bitcode buffer and prepare for lazy
|
||||
/// deserialization of function bodies. If successful, this takes ownership
|
||||
/// of 'buffer. On error, this *does not* take ownership of Buffer.
|
||||
ErrorOr<Module *> getLazyBitcodeModule(MemoryBuffer *Buffer,
|
||||
ErrorOr<Module *> getLazyBitcodeModule(std::unique_ptr<MemoryBuffer> &Buffer,
|
||||
LLVMContext &Context);
|
||||
|
||||
/// getStreamedBitcodeModule - Read the header of the specified stream
|
||||
|
||||
Reference in New Issue
Block a user