[clang] [llvm] [dwarf] make dwarf fission compatible with RISCV relaxations  (PR #164128)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Oct 23 05:55:44 PDT 2025
    
    
  
================
@@ -3290,34 +3275,70 @@ static MCSymbol *emitLoclistsTableHeader(AsmPrinter *Asm,
   return TableEnd;
 }
 
-template <typename Ranges, typename PayloadEmitter>
-static void emitRangeList(
-    DwarfDebug &DD, AsmPrinter *Asm, MCSymbol *Sym, const Ranges &R,
-    const DwarfCompileUnit &CU, unsigned BaseAddressx, unsigned OffsetPair,
-    unsigned StartxLength, unsigned EndOfList,
-    StringRef (*StringifyEnum)(unsigned),
-    bool ShouldUseBaseAddress,
-    PayloadEmitter EmitPayload) {
+namespace {
+
+struct DebugLocSpanList {
+  MCSymbol *Label;
+  const DwarfCompileUnit *CU;
+  llvm::ArrayRef<llvm::DebugLocStream::Entry> Ranges;
+};
----------------
dlav-sc wrote:
I introduced this struct mainly because I needed a template parameter to specialize `DwarfRangeListTraits`. Furthermore, since we already have `RangesSpanList`, it makes sense to add a corresponding struct for `DebugLocs` for symmetry. This approach also helped clarify the parameter list, as you noticed.
https://github.com/llvm/llvm-project/pull/164128
    
    
More information about the llvm-commits
mailing list