ΒΆExpected<std::unique_ptr<Module>>
getOwningLazyBitcodeModule(
std::unique_ptr<MemoryBuffer>&& Buffer,
llvm::LLVMContext& Context,
bool ShouldLazyLoadMetadata = false,
bool IsImporting = false)
Expected<std::unique_ptr<Module>>
getOwningLazyBitcodeModule(
std::unique_ptr<MemoryBuffer>&& Buffer,
llvm::LLVMContext& Context,
bool ShouldLazyLoadMetadata = false,
bool IsImporting = false)
Description
Like getLazyBitcodeModule, except that the module takes ownership of the memory buffer if successful. 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.
Declared at: llvm/include/llvm/Bitcode/BitcodeReader.h:147
Parameters
- std::unique_ptr<MemoryBuffer>&& Buffer
- llvm::LLVMContext& Context
- bool ShouldLazyLoadMetadata = false
- bool IsImporting = false