aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/expressions.h
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2017-11-15 01:52:45 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-11-15 01:52:45 +0000
commitf60bea11ada835a0b007469816bd1130a2f9a77a (patch)
tree7e8327ba5a0ccf9a4397727a17e2745d7538d747 /gcc/go/gofrontend/expressions.h
parentc2ad9885c01b3c5dd951dd707773de66cd7bb27c (diff)
downloadgcc-f60bea11ada835a0b007469816bd1130a2f9a77a.zip
gcc-f60bea11ada835a0b007469816bd1130a2f9a77a.tar.gz
gcc-f60bea11ada835a0b007469816bd1130a2f9a77a.tar.bz2
compiler: remove LHS/RHS context determination for var exprs
Remove the code that determined LHS/RHS context for var expressions (was needed previously for some instances of the back end). LHS/RHS context is computed by the back end in all cases, so no need to have this code in the front end any more. Reviewed-on: https://go-review.googlesource.com/77510 * go-gcc.cc (var_expression): Remove Varexpr_context parameter. From-SVN: r254748
Diffstat (limited to 'gcc/go/gofrontend/expressions.h')
-rw-r--r--gcc/go/gofrontend/expressions.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h
index 0c742fd..9f58f49 100644
--- a/gcc/go/gofrontend/expressions.h
+++ b/gcc/go/gofrontend/expressions.h
@@ -1298,7 +1298,7 @@ class Var_expression : public Expression
public:
Var_expression(Named_object* variable, Location location)
: Expression(EXPRESSION_VAR_REFERENCE, location),
- variable_(variable), in_lvalue_pos_(VE_rvalue)
+ variable_(variable)
{ }
// Return the variable.
@@ -1306,16 +1306,6 @@ class Var_expression : public Expression
named_object() const
{ return this->variable_; }
- // Does this var expression appear in an lvalue (assigned-to) context?
- bool
- in_lvalue_pos() const
- { return this->in_lvalue_pos_ == VE_lvalue; }
-
- // Mark a var_expression as appearing in an lvalue context.
- void
- set_in_lvalue_pos()
- { this->in_lvalue_pos_ = VE_lvalue; }
-
protected:
Expression*
do_lower(Gogo*, Named_object*, Statement_inserter*, int);
@@ -1346,8 +1336,6 @@ class Var_expression : public Expression
private:
// The variable we are referencing.
Named_object* variable_;
- // Set to TRUE if var expression appears in lvalue context
- Varexpr_context in_lvalue_pos_;
};
// A reference to a variable within an enclosing function.