Like getLazyBitcodeModule, but the module owns the memory buffer.
Synopsis
Declared in <llvm/Bitcode/BitcodeReader.h>
Expected<std::unique_ptr<Module>>
getOwningLazyBitcodeModule(
std::unique_ptr<MemoryBuffer>&& Buffer,
LLVMContext& Context,
bool ShouldLazyLoadMetadata = false,
bool IsImporting = false,
ParserCallbacks Callbacks = {});
Description
If successful, this moves Buffer. On error, this does not move Buffer. If IsImporting is true, this module is being parsed for ThinLTO importing into another module.
Return Value
A Module that owns Buffer, or an Error on failure.
Parameters
Name |
Description |
Buffer |
Memory buffer to take ownership of on success. |
Context |
LLVM context that owns the created module. |
ShouldLazyLoadMetadata |
If true, defer loading metadata. |
IsImporting |
If true, parse for ThinLTO importing. |
Callbacks |
Optional parser customization callbacks. |
Created with MrDocs