diff options
author | Scott Linder <scott@scottlinder.com> | 2019-02-11 22:01:13 +0000 |
---|---|---|
committer | Scott Linder <scott@scottlinder.com> | 2019-02-11 22:01:13 +0000 |
commit | 72a0f4e8db404d1978138279bfcabceea9446d35 (patch) | |
tree | 87fdeed23cf1ee0714d6d24538d3fcd2d66efe3e /llvm/lib/IRReader | |
parent | 18ec3826984ccc1ba9b3a13ef7bc7fcac82a9563 (diff) | |
download | llvm-72a0f4e8db404d1978138279bfcabceea9446d35.zip llvm-72a0f4e8db404d1978138279bfcabceea9446d35.tar.gz llvm-72a0f4e8db404d1978138279bfcabceea9446d35.tar.bz2 |
[IRReader] Expose getLazyIRModule
Currently there is no way to lazy-load an in-memory IR module without
first writing it to disk. This patch just exposes the existing
implementation of getLazyIRModule.
This is effectively a revert of rL212364
Differential Revision: https://reviews.llvm.org/D56203
llvm-svn: 353755
Diffstat (limited to 'llvm/lib/IRReader')
-rw-r--r-- | llvm/lib/IRReader/IRReader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IRReader/IRReader.cpp b/llvm/lib/IRReader/IRReader.cpp index ec4422b..7ca6c2f 100644 --- a/llvm/lib/IRReader/IRReader.cpp +++ b/llvm/lib/IRReader/IRReader.cpp @@ -29,9 +29,9 @@ static const char *const TimeIRParsingGroupDescription = "LLVM IR Parsing"; static const char *const TimeIRParsingName = "parse"; static const char *const TimeIRParsingDescription = "Parse IR"; -static std::unique_ptr<Module> -getLazyIRModule(std::unique_ptr<MemoryBuffer> Buffer, SMDiagnostic &Err, - LLVMContext &Context, bool ShouldLazyLoadMetadata) { +std::unique_ptr<Module> +llvm::getLazyIRModule(std::unique_ptr<MemoryBuffer> Buffer, SMDiagnostic &Err, + LLVMContext &Context, bool ShouldLazyLoadMetadata) { if (isBitcode((const unsigned char *)Buffer->getBufferStart(), (const unsigned char *)Buffer->getBufferEnd())) { Expected<std::unique_ptr<Module>> ModuleOrErr = getOwningLazyBitcodeModule( |