ΒΆvoid embedBitcodeInModule(
llvm::Module& M,
llvm::MemoryBufferRef Buf,
bool EmbedBitcode,
bool EmbedCmdline,
const std::vector<uint8_t>& CmdArgs)
void embedBitcodeInModule(
llvm::Module& M,
llvm::MemoryBufferRef Buf,
bool EmbedBitcode,
bool EmbedCmdline,
const std::vector<uint8_t>& CmdArgs)
Description
If EmbedBitcode is set, save a copy of the llvm IR as data in the __LLVM,__bitcode section (.llvmbc on non-MacOS). If available, pass the serialized module via the Buf parameter. If not, pass an empty (default-initialized) MemoryBufferRef, and the serialization will be handled by this API. The same behavior happens if the provided Buf is not bitcode (i.e. if it's invalid data or even textual LLVM assembly). If EmbedCmdline is set, the command line is also exported in the corresponding section (__LLVM,_cmdline / .llvmcmd) - even if CmdArgs were empty.
Declared at: llvm/include/llvm/Bitcode/BitcodeWriter.h:164
Parameters
- llvm::Module& M
- llvm::MemoryBufferRef Buf
- bool EmbedBitcode
- bool EmbedCmdline
- const std::vector<uint8_t>& CmdArgs