From 354cfba5209eed5ea6bafb6a3e69e65148c4e25d Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Wed, 11 Jun 2025 11:23:24 +0100 Subject: [DebugInfo][RemoveDIs] Remove scoped-dbg-format-setter (#143450) This was a utility for flipping between intrinsic and debug record mode -- we don't need it any more. The "IsNewDbgInfoFormat" should be true everywhere. --- llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp index fb393d33df3b..e48f735ded83 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp @@ -19,9 +19,7 @@ using namespace llvm; PreservedAnalyses BitcodeWriterPass::run(Module &M, ModuleAnalysisManager &AM) { - ScopedDbgInfoFormatSetter FormatSetter(M, M.IsNewDbgInfoFormat); - if (M.IsNewDbgInfoFormat) - M.removeDebugIntrinsicDeclarations(); + M.removeDebugIntrinsicDeclarations(); const ModuleSummaryIndex *Index = EmitSummaryIndex ? &(AM.getResult(M)) @@ -51,9 +49,7 @@ namespace { StringRef getPassName() const override { return "Bitcode Writer"; } bool runOnModule(Module &M) override { - ScopedDbgInfoFormatSetter FormatSetter(M, M.IsNewDbgInfoFormat); - if (M.IsNewDbgInfoFormat) - M.removeDebugIntrinsicDeclarations(); + M.removeDebugIntrinsicDeclarations(); WriteBitcodeToFile(M, OS, ShouldPreserveUseListOrder, /*Index=*/nullptr, /*EmitModuleHash=*/false); -- cgit v1.2.3