From 31bdd08a9d21a2fd7019bbd7b178c8911a7d2e41 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 15 Sep 2015 16:53:01 +0000 Subject: Change of location_get_source_line signature gcc/ChangeLog: * input.h (location_get_source_line): Drop "expanded_location" param in favor of a file and line number. * input.c (location_get_source_line): Likewise. (dump_location_info): Update for change in signature of location_get_source_line. * diagnostic.c (diagnostic_print_caret_line): Likewise. gcc/c-family/ChangeLog: * c-format.c (location_from_offset): Update for change in signature of location_get_source_line. * c-indentation.c (get_visual_column): Likewise. (line_contains_hash_if): Likewise. From-SVN: r227800 --- gcc/c-family/c-indentation.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'gcc/c-family/c-indentation.c') diff --git a/gcc/c-family/c-indentation.c b/gcc/c-family/c-indentation.c index fdfe0a9..dd35223 100644 --- a/gcc/c-family/c-indentation.c +++ b/gcc/c-family/c-indentation.c @@ -45,7 +45,8 @@ get_visual_column (expanded_location exploc, unsigned int *first_nws = NULL) { int line_len; - const char *line = location_get_source_line (exploc, &line_len); + const char *line = location_get_source_line (exploc.file, exploc.line, + &line_len); if (!line) return false; unsigned int vis_column = 0; @@ -84,13 +85,8 @@ get_visual_column (expanded_location exploc, static bool line_contains_hash_if (const char *file, int line_num) { - expanded_location exploc; - exploc.file = file; - exploc.line = line_num; - exploc.column = 1; - int line_len; - const char *line = location_get_source_line (exploc, &line_len); + const char *line = location_get_source_line (file, line_num, &line_len); if (!line) return false; -- cgit v1.1