diff options
author | Michael Meissner <meissner@linux.vnet.ibm.com> | 2011-10-11 19:55:09 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2011-10-11 19:55:09 +0000 |
commit | e79983f458034c3061645a4c4ff83c9c4d9019b9 (patch) | |
tree | 304b794b6f6f0af1f79b00f4166b897337141fac /gcc/go/gofrontend/gogo-tree.cc | |
parent | f0286f957326b588ba6f49d1fed0c14c19033830 (diff) | |
download | gcc-e79983f458034c3061645a4c4ff83c9c4d9019b9.zip gcc-e79983f458034c3061645a4c4ff83c9c4d9019b9.tar.gz gcc-e79983f458034c3061645a4c4ff83c9c4d9019b9.tar.bz2 |
Convert standard builtin functions from being arrays to using a functional interface
From-SVN: r179820
Diffstat (limited to 'gcc/go/gofrontend/gogo-tree.cc')
-rw-r--r-- | gcc/go/gofrontend/gogo-tree.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/go/gofrontend/gogo-tree.cc b/gcc/go/gofrontend/gogo-tree.cc index 49a0ba4..6cfc012 100644 --- a/gcc/go/gofrontend/gogo-tree.cc +++ b/gcc/go/gofrontend/gogo-tree.cc @@ -69,8 +69,7 @@ define_builtin(built_in_function bcode, const char* name, const char* libname, libname, NULL_TREE); if (const_p) TREE_READONLY(decl) = 1; - built_in_decls[bcode] = decl; - implicit_built_in_decls[bcode] = decl; + set_builtin_decl (bcode, decl, true); builtin_functions[name] = decl; if (libname != NULL) { @@ -2311,14 +2310,13 @@ Gogo::make_trampoline(tree fnaddr, tree closure, source_location location) x = save_expr(x); // Initialize the trampoline. - tree ini = build_call_expr(implicit_built_in_decls[BUILT_IN_INIT_TRAMPOLINE], + tree ini = build_call_expr(builtin_decl_implicit(BUILT_IN_INIT_TRAMPOLINE), 3, x, fnaddr, closure); // On some targets the trampoline address needs to be adjusted. For // example, when compiling in Thumb mode on the ARM, the address // needs to have the low bit set. - x = build_call_expr(implicit_built_in_decls[BUILT_IN_ADJUST_TRAMPOLINE], - 1, x); + x = build_call_expr(builtin_decl_explicit(BUILT_IN_ADJUST_TRAMPOLINE), 1, x); x = fold_convert(TREE_TYPE(fnaddr), x); return build2(COMPOUND_EXPR, TREE_TYPE(x), ini, x); |