[llvm-exegesis] Add a custom error for clustering
authorMiloš Stojanović <Milos.Stojanovic@rt-rk.com>
Thu, 6 Feb 2020 16:08:05 +0000 (17:08 +0100)
committerMiloš Stojanović <Milos.Stojanovic@rt-rk.com>
Fri, 7 Feb 2020 13:34:57 +0000 (14:34 +0100)
commit446268a223452254e054714f252705858fc47563
tree3e2e86c69f86f01965b488117607373e30b62842
parent2de2275cbdb8d123920f454f34ed4cfb4e1d2dcc
[llvm-exegesis] Add a custom error for clustering

All errors of type `Failure` are `StringError`s. In order for exit code
mapping to detect that specifically a clustering error has occurred it
needs to have a different type.

This patch also prepares D74085 where termination `report_fatal_error()`
will be replaced with emitting `StringError`s.

Differential Revision: https://reviews.llvm.org/D74124
llvm/tools/llvm-exegesis/lib/CMakeLists.txt
llvm/tools/llvm-exegesis/lib/Clustering.cpp
llvm/tools/llvm-exegesis/lib/Error.cpp [new file with mode: 0644]
llvm/tools/llvm-exegesis/lib/Error.h
llvm/tools/llvm-exegesis/llvm-exegesis.cpp