+/* Return LTO kind string name that corresponds to IDX enum value. */
+static const char *
+get_lto_kind (unsigned int idx)
+{
+ static char buffer[64];
+ const char *lto_kind_str[5] =
+ {
+ "DEF",
+ "WEAKDEF",
+ "UNDEF",
+ "WEAKUNDEF",
+ "COMMON"
+ };
+
+ if (idx < ARRAY_SIZE (lto_kind_str))
+ return lto_kind_str [idx];
+
+ sprintf (buffer, _("unknown LTO kind value %x"), idx);
+ return buffer;
+}
+
+/* Return LTO resolution string name that corresponds to IDX enum value. */
+static const char *
+get_lto_resolution (unsigned int idx)
+{
+ static char buffer[64];
+ static const char *lto_resolution_str[10] =
+ {
+ "UNKNOWN",
+ "UNDEF",
+ "PREVAILING_DEF",
+ "PREVAILING_DEF_IRONLY",
+ "PREEMPTED_REG",
+ "PREEMPTED_IR",
+ "RESOLVED_IR",
+ "RESOLVED_EXEC",
+ "RESOLVED_DYN",
+ "PREVAILING_DEF_IRONLY_EXP",
+ };
+
+ if (idx < ARRAY_SIZE (lto_resolution_str))
+ return lto_resolution_str [idx];
+
+ sprintf (buffer, _("unknown LTO resolution value %x"), idx);
+ return buffer;
+}
+
+/* Return LTO visibility string name that corresponds to IDX enum value. */
+static const char *
+get_lto_visibility (unsigned int idx)
+{
+ static char buffer[64];
+ const char *lto_visibility_str[4] =
+ {
+ "DEFAULT",
+ "PROTECTED",
+ "INTERNAL",
+ "HIDDEN"
+ };
+
+ if (idx < ARRAY_SIZE (lto_visibility_str))
+ return lto_visibility_str [idx];
+
+ sprintf (buffer, _("unknown LTO visibility value %x"), idx);
+ return buffer;
+}
+