aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/expressions.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go/gofrontend/expressions.h')
-rw-r--r--gcc/go/gofrontend/expressions.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h
index 259eeb6..712f687 100644
--- a/gcc/go/gofrontend/expressions.h
+++ b/gcc/go/gofrontend/expressions.h
@@ -549,6 +549,16 @@ class Expression
location() const
{ return this->location_; }
+ // Set the location of an expression and all its subexpressions.
+ // This is used for const declarations where the expression is
+ // copied from an earlier declaration.
+ void
+ set_location(Location loc);
+
+ // For set_location. This should really be a local class in
+ // Expression, but it needs types defined in gogo.h.
+ friend class Set_location;
+
// Return whether this is a constant expression.
bool
is_constant() const