Displaying 11 results from an estimated 11 matches for "mbref".
Did you mean:
bref
2017 Jun 14
2
Using LLD to create a .lib from a .def
...can write the following user code:
// writes the output to dll_path with .dll replaced with .lib
void ZigLLDDefToLib(Buf *def_contents, Buf *dll_path) {
lld::coff::Config = new lld::coff::Configuration;
auto mem_buf = MemoryBuffer::getMemBuffer(buf_ptr(def_contents));
MemoryBufferRef mbref(*mem_buf);
lld::coff::parseModuleDefs(mbref);
lld::coff::Config->OutputFile = buf_ptr(dll_path);
lld::coff::writeImportLibrary();
}
Then I give it def_contents that looks like:
LIBRARY kernel32
EXPORTS
ExitProcess
GetConsoleMode
GetStdHandle
GetFileInformationByHandleEx
WriteFile
G...
2016 Oct 26
2
RFC: APIs for bitcode files containing multiple modules
...g a multi-module bitcode file would be supported with a BitcodeReader
class. Each of the functional reader APIs in ReaderWriter.h would have a
member function on BitcodeReader. We would also have a next() member
function which would move to the next module in the file. For example:
BitcodeReader R(MBRef);
Expected<bool> B = R.hasGlobalValueSummary();
std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the first
module
R.next();
std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load the
second module
We'd continue to support the existing functiona...
2017 Jun 15
2
Using LLD to create a .lib from a .def
...; // writes the output to dll_path with .dll replaced with .lib
>> void ZigLLDDefToLib(Buf *def_contents, Buf *dll_path) {
>> lld::coff::Config = new lld::coff::Configuration;
>> auto mem_buf = MemoryBuffer::getMemBuffer(buf_ptr(def_contents));
>> MemoryBufferRef mbref(*mem_buf);
>> lld::coff::parseModuleDefs(mbref);
>> lld::coff::Config->OutputFile = buf_ptr(dll_path);
>> lld::coff::writeImportLibrary();
>> }
>>
>>
>> Then I give it def_contents that looks like:
>> LIBRARY kernel32
>> EXPORTS
&...
2017 Jun 16
2
Using LLD to create a .lib from a .def
...th with .dll replaced with .lib
>>>> void ZigLLDDefToLib(Buf *def_contents, Buf *dll_path) {
>>>> lld::coff::Config = new lld::coff::Configuration;
>>>> auto mem_buf = MemoryBuffer::getMemBuffer(buf_ptr(def_contents));
>>>> MemoryBufferRef mbref(*mem_buf);
>>>> lld::coff::parseModuleDefs(mbref);
>>>> lld::coff::Config->OutputFile = buf_ptr(dll_path);
>>>> lld::coff::writeImportLibrary();
>>>> }
>>>>
>>>>
>>>> Then I give it def_contents that...
2016 Oct 26
0
RFC: APIs for bitcode files containing multiple modules
...module bitcode file would be supported with a BitcodeReader class. Each of the functional reader APIs in ReaderWriter.h would have a member function on BitcodeReader. We would also have a next() member function which would move to the next module in the file. For example:
>
> BitcodeReader R(MBRef);
> Expected<bool> B = R.hasGlobalValueSummary();
> std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the first module
> R.next();
> std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load the second module
That makes the API quite state...
2016 Oct 26
2
RFC: APIs for bitcode files containing multiple modules
...would be supported with a
> BitcodeReader class. Each of the functional reader APIs in ReaderWriter.h
> would have a member function on BitcodeReader. We would also have a next()
> member function which would move to the next module in the file. For
> example:
>
> BitcodeReader R(MBRef);
> Expected<bool> B = R.hasGlobalValueSummary();
> std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the
> first module
> R.next();
> std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load the
> second module
>
>
>
> Th...
2016 Oct 28
0
RFC: APIs for bitcode files containing multiple modules
...a
>> BitcodeReader class. Each of the functional reader APIs in ReaderWriter.h
>> would have a member function on BitcodeReader. We would also have a next()
>> member function which would move to the next module in the file. For
>> example:
>>
>> BitcodeReader R(MBRef);
>> Expected<bool> B = R.hasGlobalValueSummary();
What's this used for? Would there be a "readGlobalValueSummary()"
similar to function summaries?
>> std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the
>> first module
>> R.next(...
2016 Oct 28
2
RFC: APIs for bitcode files containing multiple modules
...ch of the functional reader APIs in
> ReaderWriter.h
> >> would have a member function on BitcodeReader. We would also have a
> next()
> >> member function which would move to the next module in the file. For
> >> example:
> >>
> >> BitcodeReader R(MBRef);
> >> Expected<bool> B = R.hasGlobalValueSummary();
>
> What's this used for?
This would be the equivalent to the existing llvm::hasGlobalValueSummary()
function, which currently controls whether we compile a module with regular
LTO or with ThinLTO.
Would there be a &qu...
2016 Oct 28
0
RFC: APIs for bitcode files containing multiple modules
...gt;> ReaderWriter.h
>> >> would have a member function on BitcodeReader. We would also have a
>> >> next()
>> >> member function which would move to the next module in the file. For
>> >> example:
>> >>
>> >> BitcodeReader R(MBRef);
>> >> Expected<bool> B = R.hasGlobalValueSummary();
>>
>> What's this used for?
>
>
> This would be the equivalent to the existing llvm::hasGlobalValueSummary()
> function, which currently controls whether we compile a module with regular
> LTO or...
2016 Oct 28
2
RFC: APIs for bitcode files containing multiple modules
...r.h
>>>>> would have a member function on BitcodeReader. We would also have a
>>>>> next()
>>>>> member function which would move to the next module in the file. For
>>>>> example:
>>>>>
>>>>> BitcodeReader R(MBRef);
>>>>> Expected<bool> B = R.hasGlobalValueSummary();
>>>
>>> What's this used for?
>>
>>
>> This would be the equivalent to the existing llvm::hasGlobalValueSummary()
>> function, which currently controls whether we compile a mo...
2016 Oct 28
0
RFC: APIs for bitcode files containing multiple modules
...> would have a member function on BitcodeReader. We would also have a
>>>>>> next()
>>>>>> member function which would move to the next module in the file. For
>>>>>> example:
>>>>>>
>>>>>> BitcodeReader R(MBRef);
>>>>>> Expected<bool> B = R.hasGlobalValueSummary();
>>>>
>>>> What's this used for?
>>>
>>>
>>> This would be the equivalent to the existing llvm::hasGlobalValueSummary()
>>> function, which currently cont...