LLVM: lib/Transforms/IPO/EmbedBitcodePass.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
20
21#include
22
23using namespace llvm;
24
26 if (M.getGlobalVariable("llvm.embedded.module", true))
28
29 Triple T(M.getTargetTriple());
32 "EmbedBitcode pass currently only supports ELF object format");
33
34 std::string Data;
36 if (IsThinLTO)
38 else
39 BitcodeWriterPass(OS, false, EmitLTOSummary)
40 .run(M, AM);
41
43
45}
This file provides a bitcode writing pass.
This file provides a pass which clones the current module and runs the provided pass pipeline on the ...
This header defines various interfaces for pass management in LLVM.
Pass for writing a module of IR out to a bitcode file.
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &)
Run the bitcode writer pass, and output the module to the selected output stream.
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &)
Definition EmbedBitcodePass.cpp:25
A Module instance is used to store all the information related to an LLVM module.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
Triple - Helper class for working with autoconf configuration names.
A raw_ostream that writes to an std::string.
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
LLVM_ABI void embedBufferInModule(Module &M, MemoryBufferRef Buf, StringRef SectionName, Align Alignment=Align(1))
Embed the memory buffer Buf into the module M as a global using the specified section name.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
LLVM_ABI void reportFatalUsageError(Error Err)
Report a fatal error that does not indicate a bug in LLVM.