summaryrefslogtreecommitdiffstats
path: root/scripts/dtc/srcpos.h
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc/srcpos.h')
-rw-r--r--scripts/dtc/srcpos.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/dtc/srcpos.h b/scripts/dtc/srcpos.h
index 9ded12a3830a..6326a952c40e 100644
--- a/scripts/dtc/srcpos.h
+++ b/scripts/dtc/srcpos.h
@@ -74,6 +74,7 @@ struct srcpos {
74 int last_line; 74 int last_line;
75 int last_column; 75 int last_column;
76 struct srcfile_state *file; 76 struct srcfile_state *file;
77 struct srcpos *next;
77}; 78};
78 79
79#define YYLTYPE struct srcpos 80#define YYLTYPE struct srcpos
@@ -93,19 +94,18 @@ struct srcpos {
93 YYRHSLOC(Rhs, 0).last_column; \ 94 YYRHSLOC(Rhs, 0).last_column; \
94 (Current).file = YYRHSLOC (Rhs, 0).file; \ 95 (Current).file = YYRHSLOC (Rhs, 0).file; \
95 } \ 96 } \
97 (Current).next = NULL; \
96 } while (0) 98 } while (0)
97 99
98 100
99/*
100 * Fictional source position used for IR nodes that are
101 * created without otherwise knowing a true source position.
102 * For example,constant definitions from the command line.
103 */
104extern struct srcpos srcpos_empty;
105
106extern void srcpos_update(struct srcpos *pos, const char *text, int len); 101extern void srcpos_update(struct srcpos *pos, const char *text, int len);
107extern struct srcpos *srcpos_copy(struct srcpos *pos); 102extern struct srcpos *srcpos_copy(struct srcpos *pos);
103extern struct srcpos *srcpos_extend(struct srcpos *new_srcpos,
104 struct srcpos *old_srcpos);
108extern char *srcpos_string(struct srcpos *pos); 105extern char *srcpos_string(struct srcpos *pos);
106extern char *srcpos_string_first(struct srcpos *pos, int level);
107extern char *srcpos_string_last(struct srcpos *pos, int level);
108
109 109
110extern void PRINTF(3, 0) srcpos_verror(struct srcpos *pos, const char *prefix, 110extern void PRINTF(3, 0) srcpos_verror(struct srcpos *pos, const char *prefix,
111 const char *fmt, va_list va); 111 const char *fmt, va_list va);