mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
da93b53e65
Followup to D74085. Replace the use of `report_fatal_error()` with returning the error to `llvm-exegesis.cpp` and handling it there. To facilitate this, a new `Error` type has been added which is only used to log errors to the yaml output. Differential Revision: https://reviews.llvm.org/D74215
32 lines
848 B
C++
32 lines
848 B
C++
//===-- Error.cpp -----------------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "Error.h"
|
|
|
|
namespace llvm {
|
|
namespace exegesis {
|
|
|
|
char ClusteringError::ID;
|
|
|
|
void ClusteringError::log(raw_ostream &OS) const { OS << Msg; }
|
|
|
|
std::error_code ClusteringError::convertToErrorCode() const {
|
|
return inconvertibleErrorCode();
|
|
}
|
|
|
|
char SnippetCrash::ID;
|
|
|
|
void SnippetCrash::log(raw_ostream &OS) const { OS << Msg; }
|
|
|
|
std::error_code SnippetCrash::convertToErrorCode() const {
|
|
return inconvertibleErrorCode();
|
|
}
|
|
|
|
} // namespace exegesis
|
|
} // namespace llvm
|