[llvm] [NFC] Split portions of DWARFDataExtractor into new class (PR #140096)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 5 10:05:22 PDT 2025


================
@@ -14,55 +14,42 @@
 
 #include "llvm/BinaryFormat/Dwarf.h"
 #include "llvm/Support/DataExtractor.h"
+#include "llvm/Support/Errc.h"
+#include "llvm/Support/MathExtras.h"
 
 namespace llvm {
 
-/// A DataExtractor suitable use for parsing dwarf from memory with minimal
-/// dwarf context--no sections and no objects.  getRelocated* functions
-/// return raw values.
+/// A DataExtractor suitable use for parsing dwarf from memory.  Clients use
+/// Relocator::getRelocatedValueImpl to relocate values as appropriate.
 
-class DWARFDataExtractorSimple : public DataExtractor {
+template <class Relocator> class DWARFDataExtractorBase : public DataExtractor {
----------------
dwblaikie wrote:

Don't think we have a documented convention, but at least in llvm/include, there's more use of `typename` in template argument lists than `class` (at a very dodgy grepping, at least... ) - I'd tend to favor that.

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


More information about the llvm-commits mailing list