From e2f42f4ce7d2cb2a9eaa1cfeb1b6b69b061704f7 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 28 Jun 2017 15:40:42 +0200 Subject: hipe: Do not use deprecated functions in string(3) Should probably be left for the HiPE team to fix --- lib/hipe/main/hipe.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/hipe/main/hipe.erl') diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl index 19b4e8bfe2..f5f5bf5830 100644 --- a/lib/hipe/main/hipe.erl +++ b/lib/hipe/main/hipe.erl @@ -1616,11 +1616,11 @@ llvm_support_available() -> get_llvm_version() -> OptStr = os:cmd("opt -version"), SubStr = "LLVM version ", N = length(SubStr), - case string:str(OptStr, SubStr) of - 0 -> % No opt available + case string:find(OptStr, SubStr) of + nomatch -> % No opt available {0, 0}; S -> - case string:tokens(string:sub_string(OptStr, S + N), ".") of + case string:lexemes(string:slice(S, N), ".") of [MajorS, MinorS | _] -> case {string:to_integer(MajorS), string:to_integer(MinorS)} of {{Major, ""}, {Minor, _}} -- cgit v1.2.3