aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/main/hipe.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-11-24 14:51:01 +0100
committerBjörn Gustavsson <[email protected]>2011-11-24 15:11:50 +0100
commit042b9ae568fd4d00f2eeed89ae117e898593070d (patch)
treea18bdc58c568579371ab096e560092d095928723 /lib/hipe/main/hipe.erl
parent7292c3d9f5285592aa4de996f6f106cd365d7895 (diff)
downloadotp-042b9ae568fd4d00f2eeed89ae117e898593070d.tar.gz
otp-042b9ae568fd4d00f2eeed89ae117e898593070d.tar.bz2
otp-042b9ae568fd4d00f2eeed89ae117e898593070d.zip
hipe: Teach hipe to handle slim or stripped BEAM files
Diffstat (limited to 'lib/hipe/main/hipe.erl')
-rw-r--r--lib/hipe/main/hipe.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl
index 570e4d9d17..263d2e61a9 100644
--- a/lib/hipe/main/hipe.erl
+++ b/lib/hipe/main/hipe.erl
@@ -602,9 +602,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];