diff options
author | Kostis Sagonas <[email protected]> | 2016-05-27 15:51:01 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-05-31 12:19:59 +0200 |
commit | 4ae10746a3d2dd2904d0da5b54700b9a152806ed (patch) | |
tree | dc5f84c83efe49f559efbc8ecd216f68b3bdea9c /lib/hipe/main | |
parent | cbb325bd193fd407c4495e95419512312febcc1c (diff) | |
download | otp-4ae10746a3d2dd2904d0da5b54700b9a152806ed.tar.gz otp-4ae10746a3d2dd2904d0da5b54700b9a152806ed.tar.bz2 otp-4ae10746a3d2dd2904d0da5b54700b9a152806ed.zip |
Cleanups in hipe/main and hipe/rtl
* Rewrite matching statements in ?when_option macro to form that silences
dialyzer's unmatched_return warnings
* Treat compiler warnings as errors when compiling files in main
Diffstat (limited to 'lib/hipe/main')
-rw-r--r-- | lib/hipe/main/Makefile | 2 | ||||
-rw-r--r-- | lib/hipe/main/hipe.erl | 12 | ||||
-rw-r--r-- | lib/hipe/main/hipe_main.erl | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/hipe/main/Makefile b/lib/hipe/main/Makefile index 6b6cad3ed3..8ef31dbb46 100644 --- a/lib/hipe/main/Makefile +++ b/lib/hipe/main/Makefile @@ -70,7 +70,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE) include ../native.mk -ERL_COMPILE_FLAGS += +nowarn_shadow_vars +warn_missing_spec +warn_untyped_record +ERL_COMPILE_FLAGS += -Werror +nowarn_shadow_vars +warn_export_vars +warn_missing_spec +warn_untyped_record # ---------------------------------------------------- # Targets diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl index 0eaf06cb06..6c525dd143 100644 --- a/lib/hipe/main/hipe.erl +++ b/lib/hipe/main/hipe.erl @@ -596,16 +596,16 @@ fix_beam_exports([], Exports) -> Exports. get_beam_icode(Mod, {BeamCode, Exports}, File, Options) -> - ?option_time({ok, Icode} = - (catch {ok, hipe_beam_to_icode:module(BeamCode, Options)}), - "BEAM-to-Icode", Options), + {ok, Icode} = + ?option_time((catch {ok, hipe_beam_to_icode:module(BeamCode, Options)}), + "BEAM-to-Icode", Options), BeamBin = get_beam_code(File), {{Mod, Exports, Icode}, BeamBin}. get_core_icode(Mod, Core, File, Options) -> - ?option_time({ok, Icode} = - (catch {ok, cerl_to_icode:module(Core, Options)}), - "BEAM-to-Icode", Options), + {ok, Icode} = + ?option_time((catch {ok, cerl_to_icode:module(Core, Options)}), + "BEAM-to-Icode", Options), NeedBeamCode = not proplists:get_bool(load, Options), BeamBin = case NeedBeamCode of diff --git a/lib/hipe/main/hipe_main.erl b/lib/hipe/main/hipe_main.erl index b9d783d20a..4b89feb48a 100644 --- a/lib/hipe/main/hipe_main.erl +++ b/lib/hipe/main/hipe_main.erl @@ -296,7 +296,7 @@ icode_ssa_convert(IcodeCfg, Options) -> icode_ssa_const_prop(IcodeSSA, Options) -> case proplists:get_bool(icode_ssa_const_prop, Options) of true -> - ?option_time(Tmp=hipe_icode_ssa_const_prop:propagate(IcodeSSA), + Tmp = ?option_time(hipe_icode_ssa_const_prop:propagate(IcodeSSA), "Icode SSA sparse conditional constant propagation", Options), ?option_time(hipe_icode_ssa:remove_dead_code(Tmp), "Icode SSA dead code elimination pass 1", Options); |