https://gcc.gnu.org/g:a1fe3311dd3f340865288fbf370267b57795db06

commit r16-3507-ga1fe3311dd3f340865288fbf370267b57795db06
Author: Kito Cheng <kito.ch...@sifive.com>
Date:   Wed Aug 27 16:03:30 2025 +0800

    RISC-V: Remove unused print_ext_doc_entry function [NFC]
    
    The print_ext_doc_entry function and associated version_t struct in
    gen-riscv-ext-opt.cc were not being used anywhere in the codebase.
    Remove them to clean up the code.
    
    gcc/
            * config/riscv/gen-riscv-ext-opt.cc (version_t): Remove unused
            struct.
            (print_ext_doc_entry): Remove unused function.

Diff:
---
 gcc/config/riscv/gen-riscv-ext-opt.cc | 44 -----------------------------------
 1 file changed, 44 deletions(-)

diff --git a/gcc/config/riscv/gen-riscv-ext-opt.cc 
b/gcc/config/riscv/gen-riscv-ext-opt.cc
index 17b8f5bb1c0e..1ca339c60f0b 100644
--- a/gcc/config/riscv/gen-riscv-ext-opt.cc
+++ b/gcc/config/riscv/gen-riscv-ext-opt.cc
@@ -4,50 +4,6 @@
 #include <stdio.h>
 #include "riscv-opts.h"
 
-struct version_t
-{
-  int major;
-  int minor;
-  version_t (int major, int minor,
-            enum riscv_isa_spec_class spec = ISA_SPEC_CLASS_NONE)
-    : major (major), minor (minor)
-  {}
-  bool operator<(const version_t &other) const
-  {
-    if (major != other.major)
-      return major < other.major;
-    return minor < other.minor;
-  }
-
-  bool operator== (const version_t &other) const
-  {
-    return major == other.major && minor == other.minor;
-  }
-};
-
-static void
-print_ext_doc_entry (const std::string &ext_name, const std::string &full_name,
-                    const std::string &desc,
-                    const std::vector<version_t> &supported_versions)
-{
-  // Implementation of the function to print the documentation entry
-  // for the extension.
-  std::set<version_t> unique_versions;
-  for (const auto &version : supported_versions)
-    unique_versions.insert (version);
-  printf ("@item %s\n", ext_name.c_str ());
-  printf ("@tab");
-  for (const auto &version : unique_versions)
-    {
-      printf (" %d.%d", version.major, version.minor);
-    }
-  printf ("\n");
-  printf ("@tab %s", full_name.c_str ());
-  if (desc.size ())
-    printf (", %s", desc.c_str ());
-  printf ("\n\n");
-}
-
 int
 main ()
 {

Reply via email to