1 //===- Types.h - Helper for the selection of C++ types. ---------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef LLVM_UTILS_TABLEGEN_TYPES_H 11 #define LLVM_UTILS_TABLEGEN_TYPES_H 12 13 #include <cstdint> 14 15 namespace llvm { 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); 20 } 21 22 #endif 23