aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2013-03-24 15:14:41 +0100
committerAnthony Ramine <[email protected]>2013-03-28 09:23:05 +0100
commitfa4f5ba69957ce79e5f7781af26d183cdb0b77b0 (patch)
tree56b4487e23433e041fad11efcac4e20c7d92c934 /lib/compiler
parent57d5d8450811eb7c79b1365ab13fec689f8decdd (diff)
downloadotp-fa4f5ba69957ce79e5f7781af26d183cdb0b77b0.tar.gz
otp-fa4f5ba69957ce79e5f7781af26d183cdb0b77b0.tar.bz2
otp-fa4f5ba69957ce79e5f7781af26d183cdb0b77b0.zip
Add a new option +clint0 to the compiler
This option makes the compiler run the Core Erlang linting pass before any optimization pass, which can crash if the given code has unbound variables, something that is detected by core_lint.
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/compile.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 497af2b52c..745f1d5cf9 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -599,7 +599,8 @@ standard_passes() ->
core_passes() ->
%% Optimization and transforms of Core Erlang code.
- [{delay,
+ [{iff,clint0,?pass(core_lint_module)},
+ {delay,
[{unless,no_copt,
[{core_old_inliner,fun test_old_inliner/1,fun core_old_inliner/1},
{iff,doldinline,{listing,"oldinline"}},