[llvm-readobj] - Implement LLVM-style dumping for .stack_sizes sections.
[llvm-complete.git] / utils / TableGen / Types.h
blob17c7742ccaacd677e97cd7b2a92cf50315b673f8
1 //===- Types.h - Helper for the selection of C++ types. ---------*- 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_UTILS_TABLEGEN_TYPES_H
10 #define LLVM_UTILS_TABLEGEN_TYPES_H
12 #include <cstdint>
14 namespace llvm {
15 /// Returns the smallest unsigned integer type that can hold the given range.
16 /// MaxSize indicates the largest size of integer to consider (in bits) and only
17 /// supports values of at least 32.
18 const char *getMinimalTypeForRange(uint64_t Range, unsigned MaxSize = 64);
20 /// Returns the smallest unsigned integer type that can hold the given bitfield.
21 const char *getMinimalTypeForEnumBitfield(uint64_t Size);
24 #endif