[llvm] [NFC] Extract Printing portions of DWARFCFIProgram to new files (PR #143762)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 12 08:49:53 PDT 2025


================
@@ -0,0 +1,41 @@
+//===- DWARFCFIPrinter.h ----------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_DWARF_DWARFCFIPRINTER_H
+#define LLVM_DEBUGINFO_DWARF_DWARFCFIPRINTER_H
+
+#include "llvm/DebugInfo/DWARF/DWARFCFIProgram.h"
+
+namespace llvm {
+
+struct DIDumpOptions;
+
+namespace dwarf {
+
+// This class is separate from CFIProgram to decouple CFIPrograms from the
+// enclosing DWARF dies and type units, which allows using them in lower-level
+// places without build dependencies.
+
+class CFIPrinter {
+public:
+  static void print(const CFIProgram &P, raw_ostream &OS,
+                    DIDumpOptions DumpOpts, unsigned IndentLevel,
----------------
Sterling-Augustine wrote:

Heh. That is left over from the original, but fixed.

https://github.com/llvm/llvm-project/pull/143762


More information about the llvm-commits mailing list