]>
Commit | Line | Data |
---|---|---|
6d5cf30b PS |
1 | --- gcc/gcc/builtins.c |
2 | +++ gcc/gcc/builtins.c | |
3 | @@ -5426,9 +5426,9 @@ | |
8905c433 PS |
4 | SUBTARGET may be used as the target for computing one of EXP's operands. |
5 | IGNORE is nonzero if the value is to be ignored. */ | |
6 | ||
7 | -rtx | |
8 | -expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, | |
9 | - int ignore) | |
10 | +static rtx | |
11 | +expand_builtin_1 (tree exp, rtx target, rtx subtarget, | |
12 | + enum machine_mode mode, int ignore) | |
13 | { | |
14 | tree fndecl = get_callee_fndecl (exp); | |
15 | tree arglist = TREE_OPERAND (exp, 1); | |
6d5cf30b | 16 | @@ -6247,6 +6247,28 @@ |
8905c433 PS |
17 | return expand_call (exp, target, ignore); |
18 | } | |
19 | ||
20 | +rtx | |
21 | +expand_builtin (tree exp, rtx target, rtx subtarget, | |
22 | + enum machine_mode mode, int ignore) | |
23 | +{ | |
24 | + enum symbol_visibility saved_visibility = default_visibility; | |
25 | + unsigned int saved_inpragma = visibility_options.inpragma; | |
6d5cf30b | 26 | + tree fndecl = get_callee_fndecl (exp); |
8905c433 PS |
27 | + rtx expanded; |
28 | + | |
29 | + /* We should use the original visibility of the builtin function | |
30 | + declaration. */ | |
6d5cf30b PS |
31 | + default_visibility = DECL_VISIBILITY (fndecl); |
32 | + visibility_options.inpragma = DECL_VISIBILITY_SPECIFIED (fndecl); | |
8905c433 PS |
33 | + |
34 | + expanded = expand_builtin_1 (exp, target, subtarget, mode, ignore); | |
35 | + | |
36 | + default_visibility = saved_visibility; | |
37 | + visibility_options.inpragma = saved_inpragma; | |
38 | + | |
39 | + return expanded; | |
40 | +} | |
41 | + | |
42 | /* Determine whether a tree node represents a call to a built-in | |
43 | function. If the tree T is a call to a built-in function with | |
44 | the right number of arguments of the appropriate types, return |