From patchwork Thu Aug 21 17:53:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 382020 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AAA6A14008C for ; Fri, 22 Aug 2014 03:53:28 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=IcUuXI11GXgFmrD4h g+SQmLEpHbEdAF1Zh0OTsOJYtZVxfMyRekAFjEsyemBDDr+vStMBWWD0RglvhoxQ 0vuJXInA2S/lllXyxOahYxKss3tz5Ga2rc+aDfXQKQkobP7vK2YLSsiKpkgeisIu a/sDL5y4Bkhz0Fj42n/R4dZbhA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=bY/5CXXxYrWHPy2GO7lcHCH ZIMU=; b=Fdv1+mEZJrO6iPHzS3PD8w7RPqFuGIXojxvbNfClWSERw6GyCel0U6Q S8o9HcRo2QNdslqiMOpoRDyvV97wFEJm6jIC1UnpuuPvoWIlMt9cGXK9u0BDw2k+ YvLp1gpNMuq5dPt6Id6ysRapecx57VhtUN0paemcWce/oqsDaEDE= Received: (qmail 11146 invoked by alias); 21 Aug 2014 17:53:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 11136 invoked by uid 89); 21 Aug 2014 17:53:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 Aug 2014 17:53:20 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7LHrICC028235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Aug 2014 13:53:19 -0400 Received: from reynosa.quesejoda.com (vpn-62-124.rdu2.redhat.com [10.10.62.124]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7LHrIKt028753 for ; Thu, 21 Aug 2014 13:53:18 -0400 Message-ID: <53F6320D.9000104@redhat.com> Date: Thu, 21 Aug 2014 10:53:17 -0700 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: gcc-patches Subject: Re: TAGs for variables created through common.opt References: <53F52146.5010204@redhat.com> In-Reply-To: <53F52146.5010204@redhat.com> Well, whadayaknow... Tom Tromey pointed me at --regex which we can use to add patterns for not only the .opt files, but for a bunch of other files/languages we define in GCC. The following patch adds support for common.opt, rtl.def, tree.def, and gimple.def. Now you can use your editor to tag things like GIMPLE_NOP, and PLUS_EXPR, which means I'll get lost less often. Kinda neat, IMO. Tested by inspecting TAGS.sub manually, as well as searching for random stuff with both vi and emacs. OK for mainline? * Makefile.in (TAGS): Handle constructs in common.opt, rtl.def, tree.def, and gimple.def diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 1b3820b..f761153 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3799,7 +3799,10 @@ TAGS: lang.tags incs="$$incs --include $$dir/TAGS.sub"; \ fi; \ done; \ - etags -o TAGS.sub c-family/*.h c-family/*.c *.h *.c *.cc; \ + etags -o TAGS.sub c-family/*.h c-family/*.c *.h *.c *.cc \ + --language=none --regex="/\(char\|unsigned int\|int\|bool\|void\|HOST_WIDE_INT\|enum [A-Za-z_0-9]+\) [*]?\([A-Za-z_0-9]+\)/\2/" common.opt \ + --language=none --regex="/\(DEF_RTL_EXPR\|DEFTREECODE\|DEFGSCODE\).*(\([A-Za-z_0-9]+\)/\2/" rtl.def tree.def gimple.def \ + ; \ etags --include TAGS.sub $$incs) # -----------------------------------------------------