26 if (M.IsNewDbgInfoFormat)
27 M.removeDebugIntrinsicDeclarations();
40 bool ShouldPreserveUseListOrder;
48 explicit WriteBitcodePass(
raw_ostream &o,
bool ShouldPreserveUseListOrder)
50 ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) {
54 StringRef getPassName()
const override {
return "Bitcode Writer"; }
56 bool runOnModule(
Module &M)
override {
59 if (
M.IsNewDbgInfoFormat)
60 M.removeDebugIntrinsicDeclarations();
73char WriteBitcodePass::ID = 0;
81 bool ShouldPreserveUseListOrder) {
82 return new WriteBitcodePass(Str, ShouldPreserveUseListOrder);
bool WriteNewDbgInfoFormatToBitcode
This file provides a bitcode writing pass.
This header defines various interfaces for pass management in LLVM.
bool WriteNewDbgInfoFormatToBitcode
This is the interface to build a ModuleSummaryIndex for a module.
#define INITIALIZE_PASS_DEPENDENCY(depName)
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
A container for analyses that lazily runs them and caches their results.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represent the analysis usage information of a pass.
void setPreservesAll()
Set by analyses that do not transform their input at all.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &)
Run the bitcode writer pass, and output the module to the selected output stream.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Analysis pass to provide the ModuleSummaryIndex object.
Legacy wrapper pass to provide the ModuleSummaryIndex object.
Class to hold module path string table and global value map, and encapsulate methods for operating on...
A Module instance is used to store all the information related to an LLVM module.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Pass interface - Implemented by all 'passes'.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
void WriteBitcodeToFile(const Module &M, raw_ostream &Out, bool ShouldPreserveUseListOrder=false, const ModuleSummaryIndex *Index=nullptr, bool GenerateHash=false, ModuleHash *ModHash=nullptr)
Write the specified module to the specified raw output stream.
void initializeWriteBitcodePassPass(PassRegistry &)
Error write(MCStreamer &Out, ArrayRef< std::string > Inputs, OnCuIndexOverflow OverflowOptValue)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
ModulePass * createBitcodeWriterPass(raw_ostream &Str, bool ShouldPreserveUseListOrder=false)
Create and return a pass that writes the module to the specified ostream.
bool isBitcodeWriterPass(Pass *P)
Check whether a pass is a BitcodeWriterPass.