clang 17.0.0git
|
#include "clang/CodeGen/ConstantInitBuilder.h"
Public Types | |
using | InitBuilder = typename Traits::InitBuilder |
using | ArrayBuilder = typename Traits::ArrayBuilder |
using | StructBuilder = typename Traits::StructBuilder |
using | AggregateBuilderBase = typename Traits::AggregateBuilderBase |
Public Member Functions | |
ArrayBuilder | beginArray (llvm::Type *eltTy=nullptr) |
StructBuilder | beginStruct (llvm::StructType *ty=nullptr) |
void | finishAndAddTo (AggregateBuilderBase &parent) |
Given that this builder was created by beginning an array or struct component on the given parent builder, finish the array/struct component and add it to the parent. | |
template<class... As> | |
llvm::GlobalVariable * | finishAndCreateGlobal (As &&...args) |
Given that this builder was created by beginning an array or struct directly on a ConstantInitBuilder, finish the array/struct and create a global variable with it as the initializer. | |
void | finishAndSetAsInitializer (llvm::GlobalVariable *global) |
Given that this builder was created by beginning an array or struct directly on a ConstantInitBuilder, finish the array/struct and set it as the initializer of the given global variable. | |
ConstantInitFuture | finishAndCreateFuture () |
Given that this builder was created by beginning an array or struct directly on a ConstantInitBuilder, finish the array/struct and return a future which can be used to install the initializer in a global later. | |
Protected Member Functions | |
ConstantAggregateBuilderTemplateBase (InitBuilder &builder, AggregateBuilderBase *parent) | |
Impl & | asImpl () |
Definition at line 345 of file ConstantInitBuilder.h.
using clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::AggregateBuilderBase = typename Traits::AggregateBuilderBase |
Definition at line 352 of file ConstantInitBuilder.h.
using clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::ArrayBuilder = typename Traits::ArrayBuilder |
Definition at line 350 of file ConstantInitBuilder.h.
using clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::InitBuilder = typename Traits::InitBuilder |
Definition at line 349 of file ConstantInitBuilder.h.
using clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::StructBuilder = typename Traits::StructBuilder |
Definition at line 351 of file ConstantInitBuilder.h.
|
inlineprotected |
Definition at line 355 of file ConstantInitBuilder.h.
|
inlineprotected |
Definition at line 359 of file ConstantInitBuilder.h.
Referenced by clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndAddTo(), clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndCreateFuture(), clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndCreateGlobal(), and clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndSetAsInitializer().
|
inline |
Definition at line 362 of file ConstantInitBuilder.h.
Referenced by clang::CodeGen::CodeGenVTables::createVTableInitializer().
|
inline |
Definition at line 366 of file ConstantInitBuilder.h.
|
inline |
Given that this builder was created by beginning an array or struct component on the given parent builder, finish the array/struct component and add it to the parent.
It is an intentional choice that the parent is passed in explicitly despite it being redundant with information already kept in the builder. This aids in readability by making it easier to find the places that add components to a builder, as well as "bookending" the sub-builder more explicitly.
Definition at line 379 of file ConstantInitBuilder.h.
References clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::asImpl(), and Parent.
|
inline |
Given that this builder was created by beginning an array or struct directly on a ConstantInitBuilder, finish the array/struct and return a future which can be used to install the initializer in a global later.
This is useful for allowing a finished initializer to passed to an API which will build the global. However, the "future" preserves a dependency on the original builder; it is an error to pass it aside.
Definition at line 410 of file ConstantInitBuilder.h.
References clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::asImpl(), and Parent.
|
inline |
Given that this builder was created by beginning an array or struct directly on a ConstantInitBuilder, finish the array/struct and create a global variable with it as the initializer.
Definition at line 388 of file ConstantInitBuilder.h.
References clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::asImpl(), and Parent.
|
inline |
Given that this builder was created by beginning an array or struct directly on a ConstantInitBuilder, finish the array/struct and set it as the initializer of the given global variable.
Definition at line 397 of file ConstantInitBuilder.h.
References clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::asImpl(), and Parent.