diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-10-24 01:49:23 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-10-24 01:49:23 +0000 |
commit | 3c7652863686230db5cb861ebfcbc600f10156e0 (patch) | |
tree | fefc70c1ab55551854cd9b757e03f44f69d717ac /gcc/go/gofrontend/runtime.cc | |
parent | 7a149e7a51cd71abf4b6313e3d50add654e98c23 (diff) | |
download | gcc-3c7652863686230db5cb861ebfcbc600f10156e0.zip gcc-3c7652863686230db5cb861ebfcbc600f10156e0.tar.gz gcc-3c7652863686230db5cb861ebfcbc600f10156e0.tar.bz2 |
compiler: Simplify making integer expressions.
Instead of always needing an mpz_t, add helper functions to
create an integer functions from signed or unsigned long
values.
From-SVN: r216610
Diffstat (limited to 'gcc/go/gofrontend/runtime.cc')
-rw-r--r-- | gcc/go/gofrontend/runtime.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/go/gofrontend/runtime.cc b/gcc/go/gofrontend/runtime.cc index 4370a58..de68f64 100644 --- a/gcc/go/gofrontend/runtime.cc +++ b/gcc/go/gofrontend/runtime.cc @@ -397,12 +397,8 @@ Type* Runtime::map_iteration_type() { const unsigned long map_iteration_size = 4; - - mpz_t ival; - mpz_init_set_ui(ival, map_iteration_size); - Expression* iexpr = Expression::make_integer(&ival, NULL, - Linemap::predeclared_location()); - mpz_clear(ival); - + Expression* iexpr = + Expression::make_integer_ul(map_iteration_size, NULL, + Linemap::predeclared_location()); return Type::make_array_type(runtime_function_type(RFT_POINTER), iexpr); } |