aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@sifive.com>2025-08-27 16:03:30 +0800
committerKito Cheng <kito.cheng@sifive.com>2025-09-02 11:10:30 +0800
commita1fe3311dd3f340865288fbf370267b57795db06 (patch)
tree84b589a60d9940813555cd03cfb5ede5e544277b
parentdb195c5381ceb2570f8a1798fd82996f7ba8f82e (diff)
downloadgcc-a1fe3311dd3f340865288fbf370267b57795db06.zip
gcc-a1fe3311dd3f340865288fbf370267b57795db06.tar.gz
gcc-a1fe3311dd3f340865288fbf370267b57795db06.tar.bz2
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.
-rw-r--r--gcc/config/riscv/gen-riscv-ext-opt.cc44
1 files changed, 0 insertions, 44 deletions
diff --git a/gcc/config/riscv/gen-riscv-ext-opt.cc b/gcc/config/riscv/gen-riscv-ext-opt.cc
index 17b8f5b..1ca339c 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 ()
{