diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/contrib/llvm-project/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/contrib/llvm-project/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp index 28941d6c41cf..93fb2a821dee 100644 --- a/contrib/llvm-project/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp +++ b/contrib/llvm-project/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp @@ -40,8 +40,6 @@ namespace { class WriteBitcodePass : public ModulePass { raw_ostream &OS; // raw_ostream to print on bool ShouldPreserveUseListOrder; - bool EmitSummaryIndex; - bool EmitModuleHash; public: static char ID; // Pass identification, replacement for typeid @@ -49,29 +47,23 @@ namespace { initializeWriteBitcodePassPass(*PassRegistry::getPassRegistry()); } - explicit WriteBitcodePass(raw_ostream &o, bool ShouldPreserveUseListOrder, - bool EmitSummaryIndex, bool EmitModuleHash) + explicit WriteBitcodePass(raw_ostream &o, bool ShouldPreserveUseListOrder) : ModulePass(ID), OS(o), - ShouldPreserveUseListOrder(ShouldPreserveUseListOrder), - EmitSummaryIndex(EmitSummaryIndex), EmitModuleHash(EmitModuleHash) { + ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) { initializeWriteBitcodePassPass(*PassRegistry::getPassRegistry()); } StringRef getPassName() const override { return "Bitcode Writer"; } bool runOnModule(Module &M) override { - const ModuleSummaryIndex *Index = - EmitSummaryIndex - ? &(getAnalysis<ModuleSummaryIndexWrapperPass>().getIndex()) - : nullptr; // RemoveDIs: there's no bitcode representation of the DPValue debug-info, // convert to dbg.values before writing out. bool IsNewDbgInfoFormat = M.IsNewDbgInfoFormat; if (IsNewDbgInfoFormat) M.convertFromNewDbgValues(); - WriteBitcodeToFile(M, OS, ShouldPreserveUseListOrder, Index, - EmitModuleHash); + WriteBitcodeToFile(M, OS, ShouldPreserveUseListOrder, /*Index=*/nullptr, + /*EmitModuleHash=*/false); if (IsNewDbgInfoFormat) M.convertToNewDbgValues(); @@ -79,8 +71,6 @@ namespace { } void getAnalysisUsage(AnalysisUsage &AU) const override { AU.setPreservesAll(); - if (EmitSummaryIndex) - AU.addRequired<ModuleSummaryIndexWrapperPass>(); } }; } @@ -93,10 +83,8 @@ INITIALIZE_PASS_END(WriteBitcodePass, "write-bitcode", "Write Bitcode", false, true) ModulePass *llvm::createBitcodeWriterPass(raw_ostream &Str, - bool ShouldPreserveUseListOrder, - bool EmitSummaryIndex, bool EmitModuleHash) { - return new WriteBitcodePass(Str, ShouldPreserveUseListOrder, - EmitSummaryIndex, EmitModuleHash); + bool ShouldPreserveUseListOrder) { + return new WriteBitcodePass(Str, ShouldPreserveUseListOrder); } bool llvm::isBitcodeWriterPass(Pass *P) { |