Message ID | 20240130121026.807464-44-arthur.cohen@embecosm.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1186643dyb; Tue, 30 Jan 2024 04:34:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSKTRs13uX5f6Cfwrob2mbiQBepmxcLio0D1vS/DjEO1Tzf+kQLL2Td8ebaE2YCWe511/X X-Received: by 2002:a05:622a:2cc:b0:42a:b153:2ee3 with SMTP id a12-20020a05622a02cc00b0042ab1532ee3mr2937700qtx.5.1706618064512; Tue, 30 Jan 2024 04:34:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706618064; cv=pass; d=google.com; s=arc-20160816; b=bmrrcL4gCqv7QTYwpx1NIz1SffXGfWiO/fF1GAQl1PKk4cwRlgOGYVW0OeFLNfNf/Y Cj3uS789uPqGqePtOoYoCsyaucBrF4b0aD8Gu5aTNU6tEC9ITTA3r0BTp1qN96WE5s5X VftzN5nj5FgwW8Qj//DNX4KInUx5o+ELBjid9qgBZo4tlQLC/nyEOCIVWCe7wmKS1e2p lgNDdDDEwzyg+HkJRk5RryuKuDbsmYHkTdCQnBN5UQ6fwQI5iaQecmhuSBP0KNrAn6Sk fm2Dz9n4meYEdxrt55Twb/Xm0Q2o+zTjzzXmkRRyQap1BaA/PYQhnfRQj4nrccrdWBe3 3pUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=RSKeSm8i2kDsD+WvFTdI1bJdiVZWWv27HP1DXec1GVI=; fh=6KiXNvQww/MsyVplklPLl//mUuD+DtDm73nSHh4O4+g=; b=fmyholdS7sJ+D9MTzJQArNSq9160lBYShDSSLviYoFamXHYgm59U58bWns9hNSiDzy afolVQJXm00ySaSNRhzXqPhrOxzoqbi2y60Sn8hDi0pngMtMtZP+iMPSBDD9HvCroVv7 vWScv6g2dkhdfs5YZpwP08Bu8FWj/O18YHrH6IGmQkAHnJ0sUpfPx0Fo6yUUI76EQAm+ O2SVvhkwahH45Fo1UgLVd0lBcdU52Dt7SxhhmSSzowFPh8IhaaBgbD/ypC89roVlZM1p DgzdGHSKzOegpVPvKLipmxd2smdqdL/tGAklRLfa7Lx9ocFL1ixlm65La2YWwoIOy4P2 haRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=FDlzqANL; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 22-20020ac85716000000b0042ab5ac45f9si1443022qtw.558.2024.01.30.04.34.24 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:34:24 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=FDlzqANL; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A518D38323DE for <ouuuleilei@gmail.com>; Tue, 30 Jan 2024 12:33:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id CE65C3857C4F for <gcc-patches@gcc.gnu.org>; Tue, 30 Jan 2024 12:11:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CE65C3857C4F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CE65C3857C4F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::334 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616704; cv=none; b=arC6/ODmP3labLutxh4DQc4CjOdsazwWvxIJI2UDgni2mBpI3IB/LgZ3dlouFF3fcLczCK2fwNEmrgb+yi+d5PQ45b7rfFG5stVKFFTWdBGkwrCkM7gmdegkSUuRcHzZ7IJqvvxVU6w5FfQPzMFiKsi2/tDrFCbG8dyTlBGFoXU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616704; c=relaxed/simple; bh=PmfPeuH5NLplIoxJAssKVKIrciuumXAtRat8e7zWGAg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=w/s2D69i8QI0efq7w9IXfevqlWDobLplhjQWie9RjSrSLMXuEkB9CulrCPYn71xKXGjFxYAZ5qWJmAkiwOvIE+1UafQgbiWw+Z9xMOoN9YCeLbMEAfG1olarO/8GFz094y5l4q1ca046GfaJn8kMVWR6ikOGsnfQPcpZh14jhUM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40e76626170so43132975e9.2 for <gcc-patches@gcc.gnu.org>; Tue, 30 Jan 2024 04:11:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1706616681; x=1707221481; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=RSKeSm8i2kDsD+WvFTdI1bJdiVZWWv27HP1DXec1GVI=; b=FDlzqANLVdOwwSP6ioEZ8XN3dz1HezGuJQYOkNvZihNKRh/3JYxSbBTBGR4MAdcMy6 /SRHVuhrOtfApDZTlQMiYpnLJkK3vfOS9x+Oy2qHdFukG1WkFJbmFkyiXlim+3HbIRgG /2hhmJ7e+9D6ChY5MdtNlTcD9iTv5H3eozx7dPcMCfAneQ2PWp35Ac6kskTjvRUWqSAg 6gf576qt8f2Jo8CTBq0xmuPPFv4kSG4IktDG/dow89nieoigk+Uo2I0PU2yUPl1j+r/g VLzjNRq2tHVPHC/tMlR+SggAY3yEWsGV3TR0Av+EtiIlxt1NnEnarTV07U34mEbx/MpO 3bMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706616681; x=1707221481; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RSKeSm8i2kDsD+WvFTdI1bJdiVZWWv27HP1DXec1GVI=; b=YyVvZkL4I9XO4ADeAzoIzQnteVLkVXthEGeKAW/yyvFZwhZUy936kO72jqJlwvPFF6 xrSOkKkjVxiFHSXV3uYWCo1axuHmfcbS415m5vpUSDS3x4p8GPodKXcAqwJR6EJ67xDt o6IrVeCik4NZbaUZLpKuRYxWTyPYMLxn6X9KKkK5FMie5Bd5+oz8LpqbpvLNAuz/lEk3 p1JqRg4wh8PDYgRvXGqa+lYxYFvHHWyCMzfsODCMS+9fo47qjtsrLSev2mSQJC78veKL GxE2pXdqFokhni2v1VM8sY9f/NI5HOvv0y4yXJP72BEYbD8GwKpyID0Si79nhPNqbiD1 GwMQ== X-Gm-Message-State: AOJu0YzXUEC6NhTnBxk2pE51mOzw1ho9ylDN1ubbk6MIgXj2cRTdMU0/ 76oygchHVo1P+udNSepZyCmYSSqpRUYnyEZ6iDzAZCCQtGHMpEY37Ikg35xL3wne7ucCVr25CcF 4yw== X-Received: by 2002:a05:600c:3547:b0:40e:f5d0:8517 with SMTP id i7-20020a05600c354700b0040ef5d08517mr4938948wmq.33.1706616681040; Tue, 30 Jan 2024 04:11:21 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id f9-20020a056000036900b00339307d9d31sm10569894wrf.112.2024.01.30.04.11.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:11:20 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen <arthur.cohen@embecosm.com> Subject: [COMMITTED 041/101] gccrs: ast: Add NodeId to UseTree base class Date: Tue, 30 Jan 2024 13:06:57 +0100 Message-ID: <20240130121026.807464-44-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240130121026.807464-2-arthur.cohen@embecosm.com> References: <20240130121026.807464-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: arthur.cohen@embecosm.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789518743943345457 X-GMAIL-MSGID: 1789518743943345457 |
Series |
[COMMITTED,001/101] gccrs: Add visibility to trait item
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Arthur Cohen
Jan. 30, 2024, 12:06 p.m. UTC
From: Arthur Cohen <arthur.cohen@embecosm.com>
gcc/rust/ChangeLog:
* ast/rust-item.h (class UseTree): Add `node_id` member.
---
gcc/rust/ast/rust-item.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h index 2c0e45962ce..3480d126bc0 100644 --- a/gcc/rust/ast/rust-item.h +++ b/gcc/rust/ast/rust-item.h @@ -940,6 +940,7 @@ protected: class UseTree { location_t locus; + NodeId node_id; public: enum Kind @@ -975,6 +976,7 @@ public: virtual Kind get_kind () const = 0; location_t get_locus () const { return locus; } + NodeId get_node_id () const { return node_id; } virtual void accept_vis (ASTVisitor &vis) = 0; @@ -982,7 +984,9 @@ protected: // Clone function implementation as pure virtual method virtual UseTree *clone_use_tree_impl () const = 0; - UseTree (location_t locus) : locus (locus) {} + UseTree (location_t locus) + : locus (locus), node_id (Analysis::Mappings::get ()->get_next_node_id ()) + {} }; // Use tree with a glob (wildcard) operator @@ -1182,7 +1186,7 @@ public: Kind get_kind () const override { return Rebind; } - SimplePath get_path () const + const SimplePath &get_path () const { rust_assert (has_path ()); return path;