From patchwork Sat Nov 16 01:23:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 1196003 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-513727-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="sYDhqo/U"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="FwO8cGil"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47FHSp0Gqyz9s7T for ; Sat, 16 Nov 2019 12:19:53 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :content-type:content-transfer-encoding; q=dns; s=default; b=p5J U37s+MYHQ37QWBXT2aOnxVT2YZOXnPS3I1rUFAg9OwkrKHgo0PtGxdXst02p6eXN qoWHucOEjNyRcHKcm3fpEutyPJEyyXvaURl+DqoC3o102L/zZXHeaqsvMjuzWVAC rO7cXtH24NhDmiiI7PMnqK17mPLpaLqt5TudAx5Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :content-type:content-transfer-encoding; s=default; bh=1J++p6F3I 3XJ0pN2+RV9ZPyBee0=; b=sYDhqo/UffuVeLPQ4cm5tS1hvJxY0gfJ5s284Epnf yHMRdcjIyne/LVS7bNtdQ7ypSIwBNsL6ZpxefSmMYz+qcaLWLrytRvnobOXX+Q1o 1FiRzbyEd8Pu8xUEfpn6g1L3TN5utO8RMQ1sZZIsT+UscBXRc6uH87cGDLOcyTgT AE= Received: (qmail 56640 invoked by alias); 16 Nov 2019 01:17:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 56592 invoked by uid 89); 16 Nov 2019 01:17:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=our X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 16 Nov 2019 01:17:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573867039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6re+8ysaVEOkOi9/D11cpcDMrRaElBIJJb+Mtcb7q4E=; b=FwO8cGilUXfWebeIQKwNbElU+Hlh9TRx9YrJPaGKCDZ99faUdhV+0LMp0tw97l7FbLZoP3 navhQzkGfNmR8C6/KtcZ2F8PEtvzjIbOTk4A6O97duD6eHmillHwq4Rs3TS6ZHkCpOSiIo CJnHLKzGLv9EzP5YWSjLz6LPas/X0/c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-89-vB63m7UhMyibPRQDDaSgNw-1; Fri, 15 Nov 2019 20:17:18 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 320941005500 for ; Sat, 16 Nov 2019 01:17:17 +0000 (UTC) Received: from c64.redhat.com (ovpn-112-32.phx2.redhat.com [10.3.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 475E510246FB; Sat, 16 Nov 2019 01:17:16 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 13/49] function-tests.c: expose selftest::make_fndecl for use elsewhere Date: Fri, 15 Nov 2019 20:23:00 -0500 Message-Id: <1573867416-55618-14-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1573867416-55618-1-git-send-email-dmalcolm@redhat.com> References: <1573867416-55618-1-git-send-email-dmalcolm@redhat.com> X-Mimecast-Spam-Score: 0 X-IsSubscribed: yes This is used by new selftests later on in the patch kit. gcc/ChangeLog: * function-tests.c (selftest::make_fndecl): Make non-static. * selftest.h (selftest::make_fndecl): New decl. --- gcc/function-tests.c | 4 ++-- gcc/selftest.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/function-tests.c b/gcc/function-tests.c index 2440dd6..f3406c4 100644 --- a/gcc/function-tests.c +++ b/gcc/function-tests.c @@ -82,11 +82,11 @@ namespace selftest { /* Helper function for selftests of function-creation. */ -static tree +tree make_fndecl (tree return_type, const char *name, vec ¶m_types, - bool is_variadic = false) + bool is_variadic) { tree fn_type; if (is_variadic) diff --git a/gcc/selftest.h b/gcc/selftest.h index 165dfff..c67b688 100644 --- a/gcc/selftest.h +++ b/gcc/selftest.h @@ -171,6 +171,13 @@ class line_table_test ~line_table_test (); }; +/* Helper function for selftests that need a function decl. */ + +extern tree make_fndecl (tree return_type, + const char *name, + vec ¶m_types, + bool is_variadic = false); + /* Run TESTCASE multiple times, once for each case in our test matrix. */ extern void