From patchwork Tue Jan 1 22:45:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 30929 Received: (qmail 122872 invoked by alias); 1 Jan 2019 22:45:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 122600 invoked by uid 89); 1 Jan 2019 22:45:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=longest, incompatible X-HELO: mail-wm1-f48.google.com Received: from mail-wm1-f48.google.com (HELO mail-wm1-f48.google.com) (209.85.128.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 01 Jan 2019 22:45:22 +0000 Received: by mail-wm1-f48.google.com with SMTP id d15so25386397wmb.3 for ; Tue, 01 Jan 2019 14:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=mFjXKUc+MmClOdzo06yBKSdA88NgqJX3+KxHZyZ5oLM=; b=KIEyHcABuJCtHd5kwAtG+oAllafntPabv7fe5gLq7NdrJyNk9dIR1ZNEkHkseGiNCp qx2H12FUVygmF/zrNfCNSnhpHHqVeXPP9+bAbcZFsFg6Vw725WgCX3FWF2YwKomWrDlh b9n2z3+om6DUmIaL8i8axUE0BXa66S17oYOyLh1/1CaoRtT8N2PxvkMknBCUx5uZY73t /iE2dFXiLtgSlpsoI3FqzwVBuxrDlQvAb5zMX0/RthmJ60KwLuBycf0L7TNKdZO0fsYc 7yV2fK+VIaiTtnnUjAp+nGyD5QTyN61eUECr6TIF9dNLGtGxYOZL0/C3rLYcCfgfnrUR JzPA== Return-Path: Received: from localhost (host86-172-198-47.range86-172.btcentralplus.com. [86.172.198.47]) by smtp.gmail.com with ESMTPSA id m193sm37821315wmb.26.2019.01.01.14.45.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Jan 2019 14:45:19 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 4/6] gdb: Remove final cleanup from find_overload_match Date: Tue, 1 Jan 2019 22:45:04 +0000 Message-Id: In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes This patch removes the setup of a null_cleanup in valops.c:find_overload_match, and all the calls to do_cleanups. gdb/ChangeLog: * valops.c (find_overload_match): Remove use of null_cleanup, and calls to do_cleanups. --- gdb/ChangeLog | 5 +++++ gdb/valops.c | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gdb/valops.c b/gdb/valops.c index 1a9d6a6f958..75ff7058b7c 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -2516,8 +2516,6 @@ find_overload_match (gdb::array_view args, struct type *basetype = NULL; LONGEST boffset; - struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL); - const char *obj_type_name = NULL; const char *func_name = NULL; gdb::unique_xmalloc_ptr temp_func; @@ -2547,7 +2545,6 @@ find_overload_match (gdb::array_view args, if (*valp) { *staticp = 1; - do_cleanups (all_cleanups); return 0; } } @@ -2693,7 +2690,6 @@ find_overload_match (gdb::array_view args, if (func_name == NULL) { *symp = fsym; - do_cleanups (all_cleanups); return 0; } @@ -2820,8 +2816,6 @@ find_overload_match (gdb::array_view args, *objp = temp; } - do_cleanups (all_cleanups); - switch (match_quality) { case INCOMPATIBLE: