mini-llvm 0.1.0
Loading...
Searching...
No Matches
FormatPrecision.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2
3#pragma once
4
5#include <cstdlib>
6
8
9namespace mini_llvm::mir {
10
11inline constexpr const char *specifier(Precision precision) {
12 using enum Precision;
13 switch (precision) {
14 case kSingle: return "single";
15 case kDouble: return "double";
16 default: abort();
17 }
18}
19
20} // namespace mini_llvm::mir
Definition BasicBlock.h:22
constexpr const char * specifier(Condition cond)
Definition Condition.h:15
Precision
Definition Precision.h:7
@ kDouble
Definition Precision.h:9
@ kSingle
Definition Precision.h:8