summaryrefslogtreecommitdiff
path: root/gcc/diagnostic.h
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2017-05-05 21:03:07 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2017-05-05 21:03:07 +0000
commit29c64b33b2d14f17b2b3fe80379b84fc7828c535 (patch)
treefa2957f414499bc4f89f1d8b7924c792b706a878 /gcc/diagnostic.h
parent56b8400f55f10c906f56ed458d21bb50042438a0 (diff)
downloadgcc-29c64b33b2d14f17b2b3fe80379b84fc7828c535.tar.gz
Get rid of macros for diagnostic_report_current_module
diagnostic.h has a couple of macros (diagnostic_last_module_changed and diagnostic_set_last_module) which are only used within diagnostic_report_current_module. This patch eliminates the macros in favor of static functions within diagnostic.c. No functional change intended. gcc/ChangeLog: * diagnostic.c (last_module_changed_p): New function. (set_last_module): New function. (diagnostic_report_current_module): Convert macro usage to the above functions. * diagnostic.h (diagnostic_context::last_module): Strengthen from const line_map * to const line_map_ordinary *. (diagnostic_last_module_changed): Delete macro. (diagnostic_set_last_module): Delete macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247664 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r--gcc/diagnostic.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index 846a158eeb5..89d5a08583c 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -189,7 +189,7 @@ struct diagnostic_context
/* Used to detect when the input file stack has changed since last
described. */
- const struct line_map *last_module;
+ const line_map_ordinary *last_module;
int lock;
@@ -241,16 +241,6 @@ diagnostic_inhibit_notes (diagnostic_context * context)
/* Same as output_prefixing_rule. Works on 'diagnostic_context *'. */
#define diagnostic_prefixing_rule(DC) ((DC)->printer->wrapping.rule)
-/* True if the last module or file in which a diagnostic was reported is
- different from the current one. */
-#define diagnostic_last_module_changed(DC, MAP) \
- ((DC)->last_module != MAP)
-
-/* Remember the current module or file as being the last one in which we
- report a diagnostic. */
-#define diagnostic_set_last_module(DC, MAP) \
- (DC)->last_module = MAP
-
/* Raise SIGABRT on any diagnostic of severity DK_ERROR or higher. */
#define diagnostic_abort_on_error(DC) \
(DC)->abort_on_error = true