1 //===- TextAPIError.cpp - Tapi Error ----------------------------*- 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 /// \brief Implements TAPI Error.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/TextAPI/TextAPIError.h"
17 using namespace llvm::MachO
;
19 char TextAPIError::ID
= 0;
21 void TextAPIError::log(raw_ostream
&OS
) const {
23 case TextAPIErrorCode::NoSuchArchitecture
:
24 OS
<< "no such architecture";
26 case TextAPIErrorCode::InvalidInputFormat
:
27 OS
<< "invalid input format";
30 llvm_unreachable("unhandled TextAPIErrorCode");
37 std::error_code
TextAPIError::convertToErrorCode() const {
38 llvm_unreachable("convertToErrorCode is not supported.");