//==--------- DynamicAllocator.h - Dynamic allocations ------------*- C++ -*-=// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_AST_INTERP_DYNAMIC_ALLOCATOR_H #define LLVM_CLANG_AST_INTERP_DYNAMIC_ALLOCATOR_H #include "Descriptor.h" #include "InterpBlock.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator_range.h" #include "llvm/Support/Allocator.h" namespace clang { class Expr; namespace interp { class Block; class InterpState; /// Manages dynamic memory allocations done during bytecode interpretation. /// /// We manage allocations as a map from their new-expression to a list /// of allocations. This is called an AllocationSite. For each site, we /// record whether it was allocated using new or new[], the /// IsArrayAllocation flag. /// /// For all array allocations, we need to allocate new Descriptor instances, /// so the DynamicAllocator has a llvm::BumpPtrAllocator similar to Program. class DynamicAllocator final { … }; } // namespace interp } // namespace clang #endif