]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Remove unused print_ext_doc_entry function [NFC]
authorKito Cheng <kito.cheng@sifive.com>
Wed, 27 Aug 2025 08:03:30 +0000 (16:03 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Tue, 2 Sep 2025 03:10:30 +0000 (11:10 +0800)
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.

gcc/config/riscv/gen-riscv-ext-opt.cc

index 17b8f5bb1c0e432ca3d0b8eec0a56b35f766993d..1ca339c60f0b51c8f6a6a0b6fc56aeacde9a9a5e 100644 (file)
@@ -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 ()
 {