From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7824) id 75763385EC59; Tue, 7 Sep 2021 21:06:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75763385EC59 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: David Faust To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3395] ctfc: externalize ctf_dtd_lookup X-Act-Checkin: gcc X-Git-Author: David Faust X-Git-Refname: refs/heads/master X-Git-Oldrev: 81eced213c8d69c6a031712d81d245da423992dc X-Git-Newrev: 44e4ed6a3cb9039c1251bec2d68158b68fe3fad8 Message-Id: <20210907210650.75763385EC59@sourceware.org> Date: Tue, 7 Sep 2021 21:06:50 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2021 21:06:50 -0000 https://gcc.gnu.org/g:44e4ed6a3cb9039c1251bec2d68158b68fe3fad8 commit r12-3395-g44e4ed6a3cb9039c1251bec2d68158b68fe3fad8 Author: David Faust Date: Tue Aug 3 10:00:42 2021 -0700 ctfc: externalize ctf_dtd_lookup 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. Diff: --- gcc/ctfc.c | 2 +- gcc/ctfc.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/ctfc.c b/gcc/ctfc.c index 1a6ddb80829..db6ba030301 100644 --- a/gcc/ctfc.c +++ b/gcc/ctfc.c @@ -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; diff --git a/gcc/ctfc.h b/gcc/ctfc.h index 39c527074b5..825570d807e 100644 --- a/gcc/ctfc.h +++ b/gcc/ctfc.h @@ -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);