aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/d-tree.h
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-12-23 18:04:47 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2020-12-30 11:27:52 +0100
commitac78516b2758a1a0598c45d0464d18d15661c853 (patch)
tree95583273941cb437277001299771b83ca1419e4f /gcc/d/d-tree.h
parent8f7941ca37001773a36add8119791725aeb823ba (diff)
downloadgcc-ac78516b2758a1a0598c45d0464d18d15661c853.zip
gcc-ac78516b2758a1a0598c45d0464d18d15661c853.tar.gz
gcc-ac78516b2758a1a0598c45d0464d18d15661c853.tar.bz2
d: Give the result of evaluated expressions a location
CST trees that were converted back to a D front-end AST node lost all location information of the original expression. Now this is propagated on to the literal expression. gcc/d/ChangeLog: * d-tree.h (d_eval_constant_expression): Add location argument. * d-builtins.cc (d_eval_constant_expression): Give generated constants a proper file location. * d-compiler.cc (Compiler::paintAsType): Pass expression location to d_eval_constant_expression. * d-frontend.cc (eval_builtin): Likewise.
Diffstat (limited to 'gcc/d/d-tree.h')
-rw-r--r--gcc/d/d-tree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/d/d-tree.h b/gcc/d/d-tree.h
index 31fe518..f5cf9d3 100644
--- a/gcc/d/d-tree.h
+++ b/gcc/d/d-tree.h
@@ -496,7 +496,7 @@ extern void d_init_builtins (void);
extern void d_register_builtin_type (tree, const char *);
extern void d_build_builtins_module (Module *);
extern void d_maybe_set_builtin (Module *);
-extern Expression *d_eval_constant_expression (tree);
+extern Expression *d_eval_constant_expression (const Loc &, tree);
extern void d_init_versions (void);
/* In d-codegen.cc. */