diff options
author | Ian Lance Taylor <iant@golang.org> | 2018-10-29 19:25:57 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-10-29 19:25:57 +0000 |
commit | a4e30bef6446858bba7222afcf233c2d92e5c774 (patch) | |
tree | 97f25948a4cc57ff9cc6f4141281aad27714b866 /gcc/go/go-gcc.cc | |
parent | 943cc2fb6463ab8e06c2f2bcc4281a65e9dc4a78 (diff) | |
download | gcc-a4e30bef6446858bba7222afcf233c2d92e5c774.zip gcc-a4e30bef6446858bba7222afcf233c2d92e5c774.tar.gz gcc-a4e30bef6446858bba7222afcf233c2d92e5c774.tar.bz2 |
compiler: pass a single flags argument to Backend::function
Reviewed-on: https://go-review.googlesource.com/c/145319
* go-gcc.cc (Gcc_backend::function): Change to use a single flags
parameter.
From-SVN: r265599
Diffstat (limited to 'gcc/go/go-gcc.cc')
-rw-r--r-- | gcc/go/go-gcc.cc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index 1a449b7..9c317e0 100644 --- a/gcc/go/go-gcc.cc +++ b/gcc/go/go-gcc.cc @@ -482,9 +482,7 @@ class Gcc_backend : public Backend Bfunction* function(Btype* fntype, const std::string& name, const std::string& asm_name, - bool is_visible, bool is_declaration, bool is_inlinable, - bool disable_split_stack, bool does_not_return, - bool in_unique_section, Location); + unsigned int flags, Location); Bstatement* function_defer_statement(Bfunction* function, Bexpression* undefer, @@ -3047,10 +3045,8 @@ Gcc_backend::label_address(Blabel* label, Location location) Bfunction* Gcc_backend::function(Btype* fntype, const std::string& name, - const std::string& asm_name, bool is_visible, - bool is_declaration, bool is_inlinable, - bool disable_split_stack, bool does_not_return, - bool in_unique_section, Location location) + const std::string& asm_name, unsigned int flags, + Location location) { tree functype = fntype->get_tree(); if (functype != error_mark_node) @@ -3065,9 +3061,9 @@ Gcc_backend::function(Btype* fntype, const std::string& name, tree decl = build_decl(location.gcc_location(), FUNCTION_DECL, id, functype); if (! asm_name.empty()) SET_DECL_ASSEMBLER_NAME(decl, get_identifier_from_string(asm_name)); - if (is_visible) + if ((flags & function_is_visible) != 0) TREE_PUBLIC(decl) = 1; - if (is_declaration) + if ((flags & function_is_declaration) != 0) DECL_EXTERNAL(decl) = 1; else { @@ -3079,16 +3075,16 @@ Gcc_backend::function(Btype* fntype, const std::string& name, DECL_CONTEXT(resdecl) = decl; DECL_RESULT(decl) = resdecl; } - if (!is_inlinable) + if ((flags & function_is_inlinable) == 0) DECL_UNINLINABLE(decl) = 1; - if (disable_split_stack) + if ((flags & function_no_split_stack) != 0) { tree attr = get_identifier ("no_split_stack"); DECL_ATTRIBUTES(decl) = tree_cons(attr, NULL_TREE, NULL_TREE); } - if (does_not_return) + if ((flags & function_does_not_return) != 0) TREE_THIS_VOLATILE(decl) = 1; - if (in_unique_section) + if ((flags & function_in_unique_section) != 0) resolve_unique_section(decl, 0, 1); go_preserve_from_gc(decl); |