LLVM 22.0.0git
NativeFormatting.h
Go to the documentation of this file.
1//===- NativeFormatting.h - Low level formatting helpers ---------*- 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#ifndef LLVM_SUPPORT_NATIVEFORMATTING_H
10#define LLVM_SUPPORT_NATIVEFORMATTING_H
11
13#include <cstdint>
14#include <optional>
15
16namespace llvm {
17class raw_ostream;
19enum class IntegerStyle {
20 Integer,
21 Number,
22};
24
26
28
29LLVM_ABI void write_integer(raw_ostream &S, unsigned int N, size_t MinDigits,
30 IntegerStyle Style);
31LLVM_ABI void write_integer(raw_ostream &S, int N, size_t MinDigits,
32 IntegerStyle Style);
33LLVM_ABI void write_integer(raw_ostream &S, unsigned long N, size_t MinDigits,
34 IntegerStyle Style);
35LLVM_ABI void write_integer(raw_ostream &S, long N, size_t MinDigits,
36 IntegerStyle Style);
37LLVM_ABI void write_integer(raw_ostream &S, unsigned long long N,
38 size_t MinDigits, IntegerStyle Style);
39LLVM_ABI void write_integer(raw_ostream &S, long long N, size_t MinDigits,
40 IntegerStyle Style);
41
42LLVM_ABI void write_hex(raw_ostream &S, uint64_t N, HexPrintStyle Style,
43 std::optional<size_t> Width = std::nullopt);
44LLVM_ABI void write_double(raw_ostream &S, double D, FloatStyle Style,
45 std::optional<size_t> Precision = std::nullopt);
46}
47
48#endif
49
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
#define LLVM_ABI
Definition: Compiler.h:213
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
LLVM_ABI void write_integer(raw_ostream &S, unsigned int N, size_t MinDigits, IntegerStyle Style)
LLVM_ABI size_t getDefaultPrecision(FloatStyle Style)
LLVM_ABI void write_hex(raw_ostream &S, uint64_t N, HexPrintStyle Style, std::optional< size_t > Width=std::nullopt)
LLVM_ABI void write_double(raw_ostream &S, double D, FloatStyle Style, std::optional< size_t > Precision=std::nullopt)
LLVM_ABI bool isPrefixedHexStyle(HexPrintStyle S)
#define N