diff options
author | Björn Gustavsson <[email protected]> | 2010-03-18 11:18:11 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-03-26 08:03:42 +0100 |
commit | a2c88ff1875a2039c987c1099e6d911f1b6dfce6 (patch) | |
tree | ceaffca1ab6100201448ac5d86a29f7413812c87 /lib/compiler | |
parent | 8b34c68c916219f7c93e6cc9bb6b5f42e4bc66e6 (diff) | |
download | otp-a2c88ff1875a2039c987c1099e6d911f1b6dfce6.tar.gz otp-a2c88ff1875a2039c987c1099e6d911f1b6dfce6.tar.bz2 otp-a2c88ff1875a2039c987c1099e6d911f1b6dfce6.zip |
sys_core_inline: Don't generated multiple compiler_generated annos
Multiple compiler_generated annotations are harmless, but makes
listing files harder to read during debugging.
Diffstat (limited to 'lib/compiler')
-rw-r--r-- | lib/compiler/src/sys_core_inline.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compiler/src/sys_core_inline.erl b/lib/compiler/src/sys_core_inline.erl index c8d75b80c6..06696e5950 100644 --- a/lib/compiler/src/sys_core_inline.erl +++ b/lib/compiler/src/sys_core_inline.erl @@ -201,7 +201,7 @@ kill_id_anns(Body) -> (Expr) -> %% Mark everything as compiler generated to suppress %% bogus warnings. - A = [compiler_generated|core_lib:get_anno(Expr)], + A = compiler_generated(core_lib:get_anno(Expr)), core_lib:set_anno(Expr, A) end, Body). @@ -210,3 +210,8 @@ kill_id_anns_1([{'id',_}|As]) -> kill_id_anns_1([A|As]) -> [A|kill_id_anns_1(As)]; kill_id_anns_1([]) -> []. + +compiler_generated([compiler_generated|_]=Anno) -> + Anno; +compiler_generated(Anno) -> + [compiler_generated|Anno -- [compiler_generated]]. |