1 //===-- Error.cpp -----------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 #include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX
13 #include "llvm/Support/SystemZ/zOSSupport.h"
15 #endif // LLVM_ON_UNIX
20 char ClusteringError::ID
;
22 void ClusteringError::log(raw_ostream
&OS
) const { OS
<< Msg
; }
24 std::error_code
ClusteringError::convertToErrorCode() const {
25 return inconvertibleErrorCode();
28 char SnippetExecutionFailure::ID
;
30 std::error_code
SnippetExecutionFailure::convertToErrorCode() const {
31 return inconvertibleErrorCode();
34 char SnippetSegmentationFault::ID
;
36 void SnippetSegmentationFault::log(raw_ostream
&OS
) const {
37 OS
<< "The snippet encountered a segmentation fault at address "
38 << Twine::utohexstr(Address
);
41 char SnippetSignal::ID
;
43 void SnippetSignal::log(raw_ostream
&OS
) const {
44 OS
<< "snippet crashed while running";
46 OS
<< ": " << strsignal(SignalNumber
);
49 #endif // LLVM_ON_UNIX
52 } // namespace exegesis