diff mbox

TAGs for variables created through common.opt

Message ID 53F6320D.9000104@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Aug. 21, 2014, 5:53 p.m. UTC
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

Comments

Jeff Law Aug. 30, 2014, 6:34 a.m. UTC | #1
On 08/21/14 11:53, Aldy Hernandez wrote:
> 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?
OK.
jeff
diff mbox

Patch

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)
 
 # -----------------------------------------------------