LLVM
22.0.0git
include
llvm
TextAPI
TextAPIError.h
Go to the documentation of this file.
1
//===- llvm/TextAPI/TextAPIError.h - TAPI Error -----------------*- C++ -*-===//
2
//
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
6
//
7
//===----------------------------------------------------------------------===//
8
///
9
/// \file
10
/// \brief Define TAPI specific error codes.
11
///
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_TEXTAPI_TEXTAPIERROR_H
15
#define LLVM_TEXTAPI_TEXTAPIERROR_H
16
17
#include "
llvm/Support/Compiler.h
"
18
#include "
llvm/Support/Error.h
"
19
20
namespace
llvm::MachO
{
21
enum class
TextAPIErrorCode
{
22
NoSuchArchitecture
,
23
EmptyResults
,
24
GenericFrontendError
,
25
InvalidInputFormat
,
26
UnsupportedTarget
27
};
28
29
class
LLVM_ABI
TextAPIError
:
public
llvm::ErrorInfo
<TextAPIError> {
30
public
:
31
static
char
ID
;
32
TextAPIErrorCode
EC
;
33
std::string
Msg
;
34
35
TextAPIError
(
TextAPIErrorCode
EC) : EC(EC) {}
36
TextAPIError
(
TextAPIErrorCode
EC, std::string Msg)
37
: EC(EC), Msg(
std
::
move
(Msg)) {}
38
39
void
log(
raw_ostream
&
OS
)
const override
;
40
std::error_code convertToErrorCode()
const override
;
41
};
42
43
}
// namespace llvm::MachO
44
#endif
// LLVM_TEXTAPI_TEXTAPIERROR_H
Compiler.h
LLVM_ABI
#define LLVM_ABI
Definition:
Compiler.h:213
OS
raw_pwrite_stream & OS
Definition:
SampleProfWriter.cpp:51
llvm::ErrorInfo
Base class for user error types.
Definition:
Error.h:354
llvm::MachO::TextAPIError
Definition:
TextAPIError.h:29
llvm::MachO::TextAPIError::TextAPIError
TextAPIError(TextAPIErrorCode EC)
Definition:
TextAPIError.h:35
llvm::MachO::TextAPIError::TextAPIError
TextAPIError(TextAPIErrorCode EC, std::string Msg)
Definition:
TextAPIError.h:36
llvm::MachO::TextAPIError::EC
TextAPIErrorCode EC
Definition:
TextAPIError.h:32
llvm::MachO::TextAPIError::ID
static char ID
Definition:
TextAPIError.h:31
llvm::MachO::TextAPIError::Msg
std::string Msg
Definition:
TextAPIError.h:33
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:
raw_ostream.h:53
Error.h
llvm::MachO
Definition:
MachO.h:25
llvm::MachO::TextAPIErrorCode
TextAPIErrorCode
Definition:
TextAPIError.h:21
llvm::MachO::TextAPIErrorCode::UnsupportedTarget
@ UnsupportedTarget
llvm::MachO::TextAPIErrorCode::GenericFrontendError
@ GenericFrontendError
llvm::MachO::TextAPIErrorCode::EmptyResults
@ EmptyResults
llvm::MachO::TextAPIErrorCode::NoSuchArchitecture
@ NoSuchArchitecture
llvm::MachO::TextAPIErrorCode::InvalidInputFormat
@ InvalidInputFormat
llvm::move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition:
STLExtras.h:1886
std
Implement std::hash so that hash_code can be used in STL containers.
Definition:
BitVector.h:851
Generated on Wed Sep 3 2025 01:47:28 for LLVM by
1.9.6