diff options
author | Björn Gustavsson <[email protected]> | 2011-11-28 15:05:23 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-11-28 15:05:23 +0100 |
commit | aa6824a16ba83c35ad35f9dde40c5a198c7002a2 (patch) | |
tree | cbd05ba751d4ea69f3b5caec2fdae0c9ba68265e /lib/hipe | |
parent | 5c3dbd080f27f683f2d30c9c7072547c68d715b3 (diff) | |
parent | 9ac7e19e35b02c02e15abd3abc4e7b5c8b62752d (diff) | |
download | otp-aa6824a16ba83c35ad35f9dde40c5a198c7002a2.tar.gz otp-aa6824a16ba83c35ad35f9dde40c5a198c7002a2.tar.bz2 otp-aa6824a16ba83c35ad35f9dde40c5a198c7002a2.zip |
Merge branch 'bjorn/compiler/options/OTP-9752'
* bjorn/compiler/options/OTP-9752:
filename documentation: Recommend against using filename:find_src/1,2
Teach filename:find_src/1,2 to handle slim or stripped BEAM files
filename: Eliminate failing call to Mod:module_info(source_file)
filename.erl:filter_options/1: Remove handling of dead options
compiler: Don't include {cwd,_} in module_info(compile)
compiler: Don't include source code options in module_info(compile)
hipe: Teach hipe to handle slim or stripped BEAM files
Diffstat (limited to 'lib/hipe')
-rw-r--r-- | lib/hipe/main/hipe.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl index e382085fa5..7694b2fd95 100644 --- a/lib/hipe/main/hipe.erl +++ b/lib/hipe/main/hipe.erl @@ -574,9 +574,13 @@ file(File, Options) when is_atom(File) -> disasm(File) -> case beam_disasm:file(File) of #beam_file{labeled_exports = LabeledExports, - compile_info = CompInfo, + compile_info = CompInfo0, code = BeamCode} -> - {options, CompOpts} = lists:keyfind(options, 1, CompInfo), + CompInfo = case CompInfo0 of + none -> []; + _ -> CompInfo0 + end, + CompOpts = proplists:get_value(options, CompInfo, []), HCompOpts = case lists:keyfind(hipe, 1, CompOpts) of {hipe, L} when is_list(L) -> L; {hipe, X} -> [X]; |