[llvm] [RISCV] Simplify fixup kinds that force relocations (PR #136088)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 06:19:41 PDT 2025


================
@@ -2399,12 +2401,16 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst,
 
   for (unsigned i = 0, e = Fixups.size(); i != e; ++i) {
     MCFixup &F = Fixups[i];
-    const MCFixupKindInfo &Info =
-        getAssembler().getBackend().getFixupKindInfo(F.getKind());
     OS << "  fixup " << char('A' + i) << " - "
        << "offset: " << F.getOffset() << ", value: ";
     F.getValue()->print(OS, MAI);
-    OS << ", kind: " << Info.Name << "\n";
+    OS << ", kind: ";
+    auto Kind = F.getKind();
+    if (FirstRelocationKind <= Kind)
+      OS << "relocation";
----------------
lenary wrote:

It would be good if this debug output included something to differentiate fixups/relocs, even if it's just the number. 

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


More information about the llvm-commits mailing list