Displaying 3 results from an estimated 3 matches for "readbitcodefrombuff".
Did you mean:
readbitcodefrombuffer
2015 Jun 01
2
[LLVMdev] Linking modules across contexts crashes
...code, reading the module into the
destination context. The following pseudo-code gives the idea:
bool linkModuleFromDifferentContext(Module &D, const Module &S) {
SmallVector<char, 256> Buffer;
writeBitcodeToBuffer(S, Buffer);
std::unique_ptr<Module> M = readBitcodeFromBuffer(D.getContext());
return Linker::LinkModules(&D, M.get());
}
> In any case, documentation for Linker::LinkModules should say if contexts are or aren't expected to be the same.
Good idea; patch welcome.
>
> Yuri
>
>
> ---testcase---
> #include "llvm...
2015 Jun 02
2
[LLVMdev] Linking modules across contexts crashes
...The following pseudo-code gives the idea:
>>
>> bool linkModuleFromDifferentContext(Module &D, const Module &S) {
>> SmallVector<char, 256> Buffer;
>> writeBitcodeToBuffer(S, Buffer);
>>
>> std::unique_ptr<Module> M = readBitcodeFromBuffer(D.getContext());
>> return Linker::LinkModules(&D, M.get());
>> }
>
> Duncan,
>
> Thanks for this workaround, i works. However, going to binary and back causes the significant bump in the process user time (14s->16s), while the wall clock time still lowe...
2015 May 30
2
[LLVMdev] Linking modules across contexts crashes
I get a crash when I try to link multiple modules registered in their
individual contexts.
Documentation for Linker::LinkModules doesn't mention anything about
contexts, and the first link succeeds. But the second link crashes.
Is this not the right way to merge such modules? If not, then what is
the right way?
In any case, documentation for Linker::LinkModules should say if
contexts are