[llvm] [DWARF] Generalize DWARFTypePrinter to a template class (PR #109459)
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 00:52:48 PDT 2024
================
@@ -9,19 +9,37 @@
#ifndef LLVM_DEBUGINFO_DWARF_DWARFTYPEPRINTER_H
#define LLVM_DEBUGINFO_DWARF_DWARFTYPEPRINTER_H
+#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Dwarf.h"
-#include "llvm/DebugInfo/DWARF/DWARFDie.h"
+#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
----------------
labath wrote:
Okay, but that's also going to be a problem, since lldb has its own DWARFFormValue as well. It sounds to me like you need an indirect way to refer to the DWARFFormValue type. The way that's usually done is through typedefs.
We could have the DWARFDie class provide a typedef for the form value version that is compatible with it. Or, if that's awkward for some reason, we could put the both DWARFDie and DWARFFormValue typedefs into the DWARFUnit class, and then parametrize the algorithm on the unit type.
https://github.com/llvm/llvm-project/pull/109459
More information about the llvm-commits
mailing list