aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/sys_core_inline.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-01-17 15:30:05 +0100
committerBjörn Gustavsson <[email protected]>2019-01-17 15:30:05 +0100
commit39a0f4254f759dbce35be7325e0362100baab3c5 (patch)
tree24ef61292c8e174a2ece42c65e84429bf96cef5e /lib/compiler/src/sys_core_inline.erl
parent9627785145f4db991ce0206d2fdc053557720c61 (diff)
downloadotp-39a0f4254f759dbce35be7325e0362100baab3c5.tar.gz
otp-39a0f4254f759dbce35be7325e0362100baab3c5.tar.bz2
otp-39a0f4254f759dbce35be7325e0362100baab3c5.zip
sys_core_inline: Kill *all* fun annotations when inlining
sys_core_inline didn't kill fun annotations in variables, which could lead to duplicated wrapper functions for funs. That was basically harmless because the duplicated functions were eventually discarded.
Diffstat (limited to 'lib/compiler/src/sys_core_inline.erl')
-rw-r--r--lib/compiler/src/sys_core_inline.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/compiler/src/sys_core_inline.erl b/lib/compiler/src/sys_core_inline.erl
index 5a6cc45e4a..3380e3f1bd 100644
--- a/lib/compiler/src/sys_core_inline.erl
+++ b/lib/compiler/src/sys_core_inline.erl
@@ -195,6 +195,9 @@ kill_id_anns(Body) ->
cerl_trees:map(fun(#c_fun{anno=A0}=CFun) ->
A = kill_id_anns_1(A0),
CFun#c_fun{anno=A};
+ (#c_var{anno=A0}=Var) ->
+ A = kill_id_anns_1(A0),
+ Var#c_var{anno=A};
(Expr) ->
%% Mark everything as compiler generated to
%% suppress bogus warnings.