perf tools: Refactor LLVM test warning for missing binary
authorJames Clark <james.clark@arm.com>
Tue, 31 Aug 2021 14:54:59 +0000 (15:54 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 31 Aug 2021 18:17:07 +0000 (15:17 -0300)
commita8a2d5c0b33ed32e6056f197e065cd1800b21948
tree499a417d3ae223f8cda3c5b4fbac6e156a8eef7d
parent474b3f2882b21180a23672a1f80b0591b2bed039
perf tools: Refactor LLVM test warning for missing binary

The same warning is duplicated in two places so refactor it into a
single function "search_program_and_warn". This will be used a third
time in a later commit.

Signed-off-by: James Clark <james.clark@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: clang-built-linux@googlegroups.com
Link: http://lore.kernel.org/lkml/20210831145501.2135754-1-james.clark@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/llvm-utils.c