9#ifndef LLVM_CLANG_AST_INTERP_INIT_MAP_H
10#define LLVM_CLANG_AST_INTERP_INIT_MAP_H
26 static constexpr uint64_t PER_FIELD =
sizeof(T) *
CHAR_BIT;
28 unsigned UninitFields;
29 std::unique_ptr<T[]> Data;
39 T *data() {
return Data.get(); }
40 const T *data()
const {
return Data.get(); }
43 bool initializeElement(
unsigned I);
46 bool isElementInitialized(
unsigned I)
const;
48 static constexpr size_t numFields(
unsigned N) {
49 return ((N + PER_FIELD - 1) / PER_FIELD) * 2;
72 assert(IM !=
nullptr);
79 delete (operator->)();
86 return reinterpret_cast<InitMap *
>(
V);
92 delete (operator->)();
96static_assert(
sizeof(InitMapPtr) ==
sizeof(
void *));
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T
__INTPTR_TYPE__ intptr_t
A signed integer type with the property that any valid pointer to void can be converted to this type,...
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
void deleteInitMap()
Delete the InitMap if one exists.
void noteAllInitialized()
bool allInitialized() const
Are all elements in the array already initialized?
void setInitMap(const InitMap *IM)
static constexpr intptr_t AllInitializedValue
V's value after the initmap has been destroyed because all its elements have already been initialized...
InitMap * operator->()
Access the underlying InitMap directly.
static constexpr intptr_t NoInitMapValue
V's value before an initmap has been created.
Bitfield tracking the initialisation status of elements of primitive arrays.
InitMap(unsigned N)
Initializes the map with no fields set.