From patchwork Fri May 3 23:12:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32528 Received: (qmail 1348 invoked by alias); 3 May 2019 23:12:50 -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 455 invoked by uid 89); 3 May 2019 23:12:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:792 X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.38) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 May 2019 23:12:40 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 9F9E0CBB9 for ; Fri, 3 May 2019 18:12:39 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id MhM7hJkZl90onMhM7hRer6; Fri, 03 May 2019 18:12:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DtvPFAlkSnYwgTtpGPi5clURELH/ahcnDu4FqGGLIL4=; b=pIRLbZ24bh+2+2mf+oyclQ0JZX U1rqfXImeHO7myCfRX3LfupuzWoA8XqsZOzcZ8bEtkaiEFLK7ClBQFTgqQ50k60XVQM5N3G5H+Usy +K71zWoX1gKpS/vOpupKxLhB6; Received: from 97-122-168-123.hlrn.qwest.net ([97.122.168.123]:37502 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hMhM7-003AAO-Ek; Fri, 03 May 2019 18:12:39 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 23/31] Add a noop deleter Date: Fri, 3 May 2019 17:12:23 -0600 Message-Id: <20190503231231.8954-24-tom@tromey.com> In-Reply-To: <20190503231231.8954-1-tom@tromey.com> References: <20190503231231.8954-1-tom@tromey.com> This adds a no-op deleter, which is used in subsequent patches. 2019-05-01 Tom Tromey * common/gdb_unique_ptr.h (struct noop_deleter): New. --- gdb/ChangeLog | 4 ++++ gdb/common/gdb_unique_ptr.h | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/gdb/common/gdb_unique_ptr.h b/gdb/common/gdb_unique_ptr.h index 327e1279296..a4be2bb7963 100644 --- a/gdb/common/gdb_unique_ptr.h +++ b/gdb/common/gdb_unique_ptr.h @@ -47,6 +47,13 @@ struct xfree_deleter template using unique_xmalloc_ptr = std::unique_ptr>; +/* A no-op deleter. */ +template +struct noop_deleter +{ + void operator() (T *ptr) const { } +}; + } /* namespace gdb */ #endif /* COMMON_GDB_UNIQUE_PTR_H */