aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/gogo.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-06-10 21:34:12 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-06-10 21:34:12 +0000
commite898243c23c82247ec01b32f551402ca52f32927 (patch)
treeb0d9c35dc562318a0568ad5a47888711864bc4c1 /gcc/go/gofrontend/gogo.cc
parent35c19de69645b18eeef7dbecfcd98b19f9948c84 (diff)
downloadgcc-e898243c23c82247ec01b32f551402ca52f32927.zip
gcc-e898243c23c82247ec01b32f551402ca52f32927.tar.gz
gcc-e898243c23c82247ec01b32f551402ca52f32927.tar.bz2
compiler: support inlining functions that use index expressions
Also move the determine_types pass on an inlined function body to one place, rather than doing it ad hoc as needed. This adds 79 new inlinable functions in the standard library, such as bytes.HasPrefix and bytes.LastIndexByte. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181261 From-SVN: r272133
Diffstat (limited to 'gcc/go/gofrontend/gogo.cc')
-rw-r--r--gcc/go/gofrontend/gogo.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc
index 62d6870..42a7674 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -7282,6 +7282,7 @@ Function_declaration::import_function_body(Gogo* gogo, Named_object* no)
return;
gogo->lower_block(no, outer);
+ outer->determine_types();
gogo->add_imported_inline_function(no);
}