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 | 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 ()
{
--
2.34.1