summaryrefslogtreecommitdiffstats
path: root/scripts/dtc/srcpos.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:12 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:12 +0200
commitd11999163ba62a239022d7ba98bc524730575db8 (patch)
tree3fa5bdd53229e77a9b2cac82e118cb91afe616d7 /scripts/dtc/srcpos.h
parentd8af9462c9040c2e222d90a6003581abc8fb040e (diff)
parentb9014db5661d5a447f2d2d7717ad9be839d5e741 (diff)
downloadbarebox-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.h14
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);