]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - libctf/ctf-create.c
libctf: add ctf_forwardable_kind
[thirdparty/binutils-gdb.git] / libctf / ctf-create.c
index c13b83d4d3b02d8c45104e31e9291115aa44a692..d50367d6de31cf97580cbd319d799d718608b783 100644 (file)
@@ -1241,7 +1241,7 @@ ctf_add_forward (ctf_file_t *fp, uint32_t flag, const char *name,
   ctf_dtdef_t *dtd;
   ctf_id_t type = 0;
 
-  if (kind != CTF_K_STRUCT && kind != CTF_K_UNION && kind != CTF_K_ENUM)
+  if (!ctf_forwardable_kind (kind))
     return (ctf_set_errno (fp, ECTF_NOTSUE));
 
   /* If the type is already defined or exists as a forward tag, just