Implement a cache for linemap_lookup.
authorPer Bothner <pbothner@apple.com>
Tue, 20 Jan 2004 05:17:48 +0000 (05:17 +0000)
committerPer Bothner <bothner@gcc.gnu.org>
Tue, 20 Jan 2004 05:17:48 +0000 (21:17 -0800)
commit9132fbb788b24bc4b03be723a42b16dd9f65e03f
tree9967002839c45b654992b25498aebabbe003b616
parent26d107dba89128b74d968900bbb669b47879ba18
Implement a cache for linemap_lookup.

* line-map.h (struct_line_maps):  Add cache field.
* line-map.c (linemap_init):  Zero cache field.
(linemap_add):  Set cache field to offset of newly allocated map.
(linemap_lookup):  Use and set cache field.

From-SVN: r76197
gcc/ChangeLog
gcc/line-map.c
gcc/line-map.h