From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 8BD503944816 for ; Wed, 28 Apr 2021 16:01:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8BD503944816 Received: by mail-pf1-x435.google.com with SMTP id j6so4654593pfh.5 for ; Wed, 28 Apr 2021 09:01:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=eH93wlL/14pWk8iXE24kEFLoL4EMrHsV0qihF9Xd9Fw=; b=pNFyVq41jmaOpshqT1PPBSiIKqSsBnqHMDARzU19LC9Ygxtb9RGU+UaQKxhWm36kvz Bywg2Tnwl8GkjnAU+L8oVLUefaAvaKit2Cto23UzMpvGJH5+4Pb0EmcUwyQwpbjwXtdg sL29cxrCUgQWryU2RT9JYFkgilz/ylKufYhfYjzcUmjRB2y35VVgeaYaZNBd7huurSJk C6mIMQi7NG+HEkVqGP0wOIae1iWf+Ry6u+/t+V3J583rKmPM3h5llJwlDYbVrYSVvWH1 P/EadO/vY/LO1oJ6JEukDX8IwLVrEqFFXcr9yEN3aNh8mb9N8XW4J4S7BnhVI/er0RE/ nY2Q== X-Gm-Message-State: AOAM531VTKN8Q80bzNvOUcgNGJleEhNTTXPsfdqqlXExlIpR7P+4QZyC kI2YWwRgtV7vPmwFKY/TxAUpD3t2D6lrTg== X-Google-Smtp-Source: ABdhPJwWadJ6pZcly5eGK1YqT9el4q0F5ER27qlQEnapQ2xwO4owKwKT973K7vpz0PymEfz4eO47JQ== X-Received: by 2002:aa7:8186:0:b029:27d:edb:c65a with SMTP id g6-20020aa781860000b029027d0edbc65amr3743161pfi.68.1619625718221; Wed, 28 Apr 2021 09:01:58 -0700 (PDT) Received: from [192.168.1.29] (65-130-82-141.slkc.qwest.net. [65.130.82.141]) by smtp.gmail.com with ESMTPSA id e6sm165298pgh.17.2021.04.28.09.01.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Apr 2021 09:01:57 -0700 (PDT) Subject: Re: [PATCH v2 07/21] libcc1: use std::vector when building function types To: Tom Tromey , gcc-patches@gcc.gnu.org References: <20210428010119.806184-1-tom@tromey.com> <20210428010119.806184-8-tom@tromey.com> From: Jeff Law Message-ID: Date: Wed, 28 Apr 2021 10:01:57 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210428010119.806184-8-tom@tromey.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_CSS, URIBL_CSS_A autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 16:02:00 -0000 On 4/27/2021 7:01 PM, Tom Tromey wrote: > This changes libcc1 to use std::vector in the code that builds > function types. This avoids some explicit memory management. > > libcc1/ChangeLog > 2021-04-27 Tom Tromey > > * libcp1plugin.cc (plugin_build_function_type): Use std::vector. > * libcc1plugin.cc (plugin_build_function_type): Use std::vector. Does this really work?   In general we can't stuff GC'd objects into something like std::vector.  Though I guess in this instance the lifetime is limited and we don't have to worry about the GC system? Jeff