diff options
author | Ian Lance Taylor <iant@google.com> | 2011-04-04 23:19:09 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-04-04 23:19:09 +0000 |
commit | 9403944776d0a804dbb1253430633d04aef74c51 (patch) | |
tree | 8d44210d8783d83e459d812c1f0df7bd37abb3c8 /gcc/go/gofrontend/parse.cc | |
parent | 69387b92c18aa7fe8d29aa7788ae838a027b5d48 (diff) | |
download | gcc-9403944776d0a804dbb1253430633d04aef74c51.zip gcc-9403944776d0a804dbb1253430633d04aef74c51.tar.gz gcc-9403944776d0a804dbb1253430633d04aef74c51.tar.bz2 |
Use backend interface for return statements.
* go-gcc.cc: #include "tree-iterator.h", "gimple.h", and "gogo.h".
(class Bfunction): Define.
(Gcc_backend::assignment_statement): Rename from assignment.
Check for errors.
(Gcc_backend::return_statement): New function.
(tree_to_function): New function.
* Make-lang.in (go/go-gcc.o): Depend on tree-iterator.h,
$(GIMPLE_H), and $(GO_GOGO_H).
From-SVN: r171959
Diffstat (limited to 'gcc/go/gofrontend/parse.cc')
-rw-r--r-- | gcc/go/gofrontend/parse.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index 970dc15..e5ea636 100644 --- a/gcc/go/gofrontend/parse.cc +++ b/gcc/go/gofrontend/parse.cc @@ -3732,10 +3732,7 @@ Parse::return_stat() Expression_list* vals = NULL; if (this->expression_may_start_here()) vals = this->expression_list(NULL, false); - const Function* function = this->gogo_->current_function()->func_value(); - const Typed_identifier_list* results = function->type()->results(); - this->gogo_->add_statement(Statement::make_return_statement(results, vals, - location)); + this->gogo_->add_statement(Statement::make_return_statement(vals, location)); } // IfStmt = "if" [ SimpleStmt ";" ] Expression Block [ "else" Statement ] . |