diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-09-12 07:53:12 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-09-12 07:53:12 +0200 |
commit | d11999163ba62a239022d7ba98bc524730575db8 (patch) | |
tree | 3fa5bdd53229e77a9b2cac82e118cb91afe616d7 /scripts/dtc/srcpos.h | |
parent | d8af9462c9040c2e222d90a6003581abc8fb040e (diff) | |
parent | b9014db5661d5a447f2d2d7717ad9be839d5e741 (diff) | |
download | barebox-d11999163ba62a239022d7ba98bc524730575db8.tar.gz barebox-d11999163ba62a239022d7ba98bc524730575db8.tar.xz |
Merge branch 'for-next/qemu'
Diffstat (limited to 'scripts/dtc/srcpos.h')
-rw-r--r-- | scripts/dtc/srcpos.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/dtc/srcpos.h b/scripts/dtc/srcpos.h index 9ded12a383..6326a952c4 100644 --- a/scripts/dtc/srcpos.h +++ b/scripts/dtc/srcpos.h @@ -74,6 +74,7 @@ struct srcpos { int last_line; int last_column; struct srcfile_state *file; + struct srcpos *next; }; #define YYLTYPE struct srcpos @@ -93,19 +94,18 @@ struct srcpos { YYRHSLOC(Rhs, 0).last_column; \ (Current).file = YYRHSLOC (Rhs, 0).file; \ } \ + (Current).next = NULL; \ } while (0) -/* - * Fictional source position used for IR nodes that are - * created without otherwise knowing a true source position. - * For example,constant definitions from the command line. - */ -extern struct srcpos srcpos_empty; - extern void srcpos_update(struct srcpos *pos, const char *text, int len); extern struct srcpos *srcpos_copy(struct srcpos *pos); +extern struct srcpos *srcpos_extend(struct srcpos *new_srcpos, + struct srcpos *old_srcpos); extern char *srcpos_string(struct srcpos *pos); +extern char *srcpos_string_first(struct srcpos *pos, int level); +extern char *srcpos_string_last(struct srcpos *pos, int level); + extern void PRINTF(3, 0) srcpos_verror(struct srcpos *pos, const char *prefix, const char *fmt, va_list va); |