perf parse-events: Avoid enum casts
authorIan Rogers <irogers@google.com>
Fri, 1 Sep 2023 23:39:47 +0000 (16:39 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 11 Sep 2023 13:26:36 +0000 (10:26 -0300)
commit4163644818e95ea6b0afb3982b34c4d59ed50bb2
tree3a43e396f669ee5ef9200b0d33c499be9fa7985c
parent8f91662ef8be473fb025e170601b0dd75838f7d4
perf parse-events: Avoid enum casts

Add term_type to union of values returned by the lexer to avoid casts
to and from an integer.

Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230901233949.2930562-4-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.l
tools/perf/util/parse-events.y