From patchwork Mon Apr 22 20:10:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 88880 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CFFEA3849AE6 for ; Mon, 22 Apr 2024 20:14:13 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id A6C47384A880 for ; Mon, 22 Apr 2024 20:12:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A6C47384A880 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A6C47384A880 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713816727; cv=none; b=Fvf9YdUY7fS86SKWN8eCkweOAZphsqj9GIJs+vFlq09rZ/W24hvB9HIxPIi0TrIDh6h2/dkgLrrMeIi9WxRcbpvNEpK6M8qaUtRjIs2Jp2qjXkBhBmzizAgWHdYtVjXCmQRGRfuTc+KvLWU16A6+0Eoex0S9WA+Yy0yHdaUSWKE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713816727; c=relaxed/simple; bh=RLSgP44rSnvb6a46aGRYKmE6zQ1pBheOLwnIVftO06k=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=N/40XeOqUszg3zbEDj52eLnK0MEZGjW2u5ttMOVLlykbZGIbtk63BLpBAD3/jjkZB2hDaAq+rC2bam75I38pGCqx6kC4l48cajTEYb7dFO5EoN/71TLPojFIdMEWOppeYGpfCcAi3iVeBmiNR7PYxZAMfr3pm07fX1G0Tvqd45s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smarchi-efficios.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id DA5E51E0D2; Mon, 22 Apr 2024 16:11:59 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 5/7] gdb: move RequireLongest to gdbsupport/traits.h Date: Mon, 22 Apr 2024 16:10:15 -0400 Message-ID: <20240422201157.46375-6-simon.marchi@efficios.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240422201157.46375-1-simon.marchi@efficios.com> References: <20240422201157.46375-1-simon.marchi@efficios.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3496.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Move it out of defs.h. Change-Id: Ie1743d41a57f81667650048563e66073c72230cf --- gdb/defs.h | 4 ---- gdb/extract-store-integer.h | 2 ++ gdb/regcache.h | 1 + gdbsupport/traits.h | 4 ++++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gdb/defs.h b/gdb/defs.h index 5da8ce728153..535ca6716732 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -63,10 +63,6 @@ #include "gdbsupport/enum-flags.h" #include "gdbsupport/array-view.h" -template -using RequireLongest = gdb::Requires, - std::is_same>>; - /* Just in case they're not defined in stdio.h. */ #ifndef SEEK_SET diff --git a/gdb/extract-store-integer.h b/gdb/extract-store-integer.h index 1ba5f82da9a7..fd195dc64362 100644 --- a/gdb/extract-store-integer.h +++ b/gdb/extract-store-integer.h @@ -18,6 +18,8 @@ #ifndef GDB_EXTRACT_STORE_INTEGER_H #define GDB_EXTRACT_STORE_INTEGER_H +#include "gdbsupport/traits.h" + template> T extract_integer (gdb::array_view, enum bfd_endian byte_order); diff --git a/gdb/regcache.h b/gdb/regcache.h index 1d049fe7ae8d..2f4b7d94c693 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -23,6 +23,7 @@ #include "gdbsupport/array-view.h" #include "gdbsupport/common-regcache.h" #include "gdbsupport/function-view.h" +#include "gdbsupport/traits.h" struct regcache; struct regset; diff --git a/gdbsupport/traits.h b/gdbsupport/traits.h index 92fe59f34af7..85cbc94bc6c9 100644 --- a/gdbsupport/traits.h +++ b/gdbsupport/traits.h @@ -143,4 +143,8 @@ template using Requires = typename std::enable_if::type; } +template +using RequireLongest = gdb::Requires, + std::is_same>>; + #endif /* COMMON_TRAITS_H */