[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:52:38 PDT 2025
    
    
  
================
@@ -83,8 +83,24 @@ void MCSymbol::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
   OS << '"';
 }
 
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-LLVM_DUMP_METHOD void MCSymbol::dump() const {
-  dbgs() << *this;
+bool llvm::isRangeRelaxable(const MCSymbol *Begin, const MCSymbol *End) {
+  assert(Begin && "Range without a begin symbol?");
+  assert(End && "Range without an end symbol?");
+  llvm::SmallVector<const MCFragment *> RangeFragments{};
----------------
dlav-sc wrote:
I wanted to separate the logic for obtaining fragments contained in the range and then use `llvm::any_of` to check if any of them are relaxable. However, we can use just a single loop if you prefer.
https://github.com/llvm/llvm-project/pull/164128
    
    
More information about the llvm-commits
mailing list