class AttributeFactory

Declaration

class AttributeFactory { /* full declaration omitted */ };

Description

A factory, from which one makes pools, from which one creates individual attributes which are deallocated with the pool. Note that it's tolerably cheap to create and destroy one of these as long as you don't actually allocate anything in it.

Declared at: clang/include/clang/Sema/ParsedAttr.h:727

Member Variables

private llvm::BumpPtrAllocator Alloc
private SmallVector<SmallVector<clang::ParsedAttr*, 8>, InlineFreeListsCapacity> FreeLists
Free lists. The index is determined by the following formula: (size - sizeof(ParsedAttr)) / sizeof(void*)

Method Overview

Methods

AttributeFactory()

Declared at: clang/include/clang/Sema/ParsedAttr.h:777

void* allocate(size_t size)

Description

Allocate an attribute of the given size.

Declared at: clang/include/clang/Sema/ParsedAttr.h:765

Parameters

size_t size

void deallocate(clang::ParsedAttr* AL)

Declared at: clang/include/clang/Sema/ParsedAttr.h:767

Parameters

clang::ParsedAttr* AL

void reclaimPool(clang::AttributePool& head)

Description

Reclaim all the attributes in the given pool chain, which is non-empty. Note that the current implementation is safe against reclaiming things which were not actually allocated with the allocator, although of course it's important to make sure that their allocator lives at least as long as this one.

Declared at: clang/include/clang/Sema/ParsedAttr.h:774

Parameters

clang::AttributePool& head

~AttributeFactory()

Declared at: clang/include/clang/Sema/ParsedAttr.h:778