compiler: add containing Bfunction to some backend interfaces.
authorThan McIntosh <thanm@google.com>
Fri, 16 Dec 2016 22:11:28 +0000 (22:11 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 16 Dec 2016 22:11:28 +0000 (22:11 +0000)
commit8220e3f9bd3ce1ab9ff9696befdf773960f2802a
tree7be95802bcfe2fc53857c96560d39afd05204959
parent5cdc4b0ef0381439be6cebd6ba8925f69e4d51d6
compiler: add containing Bfunction to some backend interfaces.

    Change the interfaces for backend methods that create statements to
    always pass in the enclosing Bfunction for the statement.  Having the
    function available simplifies things if a temporary variable has to be
    created during the construction of a statement.

    This also includes a change to the Mark_lvalue_varexprs helper
    class to handle indirections on the left hand side of assignments
    (e.g. "*x.y = ...").

    Reviewed-on: https://go-review.googlesource.com/34471

* go-gcc.cc (Gcc_backend::expression_statement): Add Bfunction*
parameter.
(Gcc_backend::init_statement): Likewise.
(Gcc_backend::assignment_statement): Likewise.
(Gcc_backend::if_statement): Likewise.

From-SVN: r243766
gcc/go/ChangeLog
gcc/go/go-gcc.cc
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/backend.h
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/statements.cc