mini-llvm
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
ErrorCode.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
3
#pragma once
4
5
#include <cerrno>
6
7
namespace
mini_llvm
{
8
9
enum class
ErrorCode
{
10
#define X(name, value, message) k##name = value,
11
#include "mini-llvm/utils/ErrorCode.def"
12
#undef X
13
};
14
15
inline
const
char
*
message
(
ErrorCode
code) {
16
using
enum
ErrorCode
;
17
18
#define X(name, value, message) if (code == k##name) return message;
19
#include "mini-llvm/utils/ErrorCode.def"
20
#undef X
21
22
return
"Unknown error"
;
23
}
24
25
}
// namespace mini_llvm
mini_llvm
Definition
GraphColoringAllocator.h:13
mini_llvm::message
const char * message(ErrorCode code)
Definition
ErrorCode.h:15
mini_llvm::ErrorCode
ErrorCode
Definition
ErrorCode.h:9
include
mini-llvm
utils
ErrorCode.h
Generated by
1.17.0