diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-20 08:18:16 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-20 08:18:16 +0000 |
commit | 116f0a5ff416372139ac330ded7f2db9190dfee4 (patch) | |
tree | d1a4b34f3473096402637027d37a05d9064c3507 /libcpp/macro.c | |
parent | 7e74cd03929534bffbd67ea492b1d168329ff5ff (diff) | |
download | gcc-116f0a5ff416372139ac330ded7f2db9190dfee4.tar.gz |
* macro.c (enter_macro_context): Call cb.used callback if defined.
* directives.c (do_idef, do_ifndef): Ditto.
* include/cpplib.h (struct cpp_callbacks): Add used callback.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154359 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/macro.c')
-rw-r--r-- | libcpp/macro.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcpp/macro.c b/libcpp/macro.c index 1d284cf9f8a..6647db56714 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -885,6 +885,9 @@ enter_macro_context (cpp_reader *pfile, cpp_hashnode *node, pfile->cb.used_define (pfile, pfile->directive_line, node); } + if (pfile->cb.used) + pfile->cb.used (pfile, result->src_loc, node); + macro->used = 1; if (macro->paramc == 0) |