]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ctfc: externalize ctf_dtd_lookup
authorDavid Faust <david.faust@oracle.com>
Tue, 3 Aug 2021 17:00:42 +0000 (10:00 -0700)
committerDavid Faust <david.faust@oracle.com>
Tue, 7 Sep 2021 20:48:58 +0000 (13:48 -0700)
Expose the function ctf_dtd_lookup, so that it can be used by the BPF
CO-RE machinery. The function is no longer static, and an extern
prototype is added in ctfc.h.

gcc/ChangeLog:

* ctfc.c (ctf_dtd_lookup): Function is no longer static.
* ctfc.h: Analogous change.

gcc/ctfc.c
gcc/ctfc.h

index 1a6ddb808299654753aeba234d0455ffc881476f..db6ba030301e47d0855fc6708ee73f954e0030c5 100644 (file)
@@ -132,7 +132,7 @@ ctf_dtd_insert (ctf_container_ref ctfc, ctf_dtdef_ref dtd)
 
 /* Lookup CTF type given a DWARF die for the type.  */
 
-static ctf_dtdef_ref
+ctf_dtdef_ref
 ctf_dtd_lookup (const ctf_container_ref ctfc, const dw_die_ref type)
 {
   ctf_dtdef_t entry;
index 39c527074b549143d4f4c25d02e7168ac31fb148..825570d807e99bedde8a50f8fbc909be952d9cea 100644 (file)
@@ -388,7 +388,10 @@ extern bool ctf_type_exists (ctf_container_ref, dw_die_ref, ctf_id_t *);
 
 extern void ctf_add_cuname (ctf_container_ref, const char *);
 
-extern ctf_dvdef_ref ctf_dvd_lookup (const ctf_container_ref, dw_die_ref);
+extern ctf_dtdef_ref ctf_dtd_lookup (const ctf_container_ref ctfc,
+                                    dw_die_ref die);
+extern ctf_dvdef_ref ctf_dvd_lookup (const ctf_container_ref ctfc,
+                                    dw_die_ref die);
 
 extern const char * ctf_add_string (ctf_container_ref, const char *,
                                    uint32_t *, int);