1 //===- Types.h - Helper for the selection of C++ types. ---------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_UTILS_TABLEGEN_TYPES_H
11 #define LLVM_UTILS_TABLEGEN_TYPES_H
16 /// Returns the smallest unsigned integer type that can hold the given range.
17 /// MaxSize indicates the largest size of integer to consider (in bits) and only
18 /// supports values of at least 32.
19 const char *getMinimalTypeForRange(uint64_t Range, unsigned MaxSize = 64);
21 /// Returns the smallest unsigned integer type that can hold the given bitfield.
22 const char *getMinimalTypeForEnumBitfield(uint64_t Size);