|
clang 22.0.0git
|
A helper class of ConstantInitBuilder, used for building constant struct initializers. More...
#include "clang/CodeGen/ConstantInitBuilder.h"
Friends | |
| template<class Traits> | |
| class | ConstantInitBuilderTemplateBase |
| template<class Impl, class Traits> | |
| class | CodeGen::ConstantAggregateBuilderTemplateBase |
Additional Inherited Members | |
| Public Types inherited from clang::CodeGen::ConstantStructBuilderTemplateBase< ConstantInitBuilderTraits > | |
| using | InitBuilder |
| using | AggregateBuilderBase |
| Public Types inherited from clang::CodeGen::ConstantAggregateBuilderTemplateBase< ConstantInitBuilderTraits::StructBuilder, ConstantInitBuilderTraits > | |
| using | InitBuilder |
| using | ArrayBuilder |
| using | StructBuilder |
| using | AggregateBuilderBase |
| Public Member Functions inherited from clang::CodeGen::ConstantStructBuilderTemplateBase< ConstantInitBuilderTraits > | |
| void | setPacked (bool packed) |
| void | suggestType (llvm::StructType *structTy) |
| Use the given type for the struct if its element count is correct. | |
| Public Member Functions inherited from clang::CodeGen::ConstantAggregateBuilderTemplateBase< ConstantInitBuilderTraits::StructBuilder, ConstantInitBuilderTraits > | |
| 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. | |
| 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. | |
| Public Member Functions inherited from clang::CodeGen::ConstantAggregateBuilderBase | |
| ConstantAggregateBuilderBase (const ConstantAggregateBuilderBase &)=delete | |
| ConstantAggregateBuilderBase & | operator= (const ConstantAggregateBuilderBase &)=delete |
| ConstantAggregateBuilderBase (ConstantAggregateBuilderBase &&other) | |
| ConstantAggregateBuilderBase & | operator= (ConstantAggregateBuilderBase &&other)=delete |
| size_t | size () const |
| Return the number of elements that have been added to this struct or array. | |
| bool | empty () const |
| Return true if no elements have yet been added to this struct or array. | |
| void | abandon () |
| Abandon this builder completely. | |
| void | add (llvm::Constant *value) |
| Add a new value to this initializer. | |
| void | addSize (CharUnits size) |
| Add an integer value of type size_t. | |
| void | addInt (llvm::IntegerType *intTy, uint64_t value, bool isSigned=false) |
| Add an integer value of a specific type. | |
| void | addSignedPointer (llvm::Constant *Pointer, const PointerAuthSchema &Schema, GlobalDecl CalleeDecl, QualType CalleeType) |
| Add a signed pointer using the given pointer authentication schema. | |
| void | addNullPointer (llvm::PointerType *ptrTy) |
| Add a null pointer of a specific type. | |
| void | addAll (llvm::ArrayRef< llvm::Constant * > values) |
| Add a bunch of new values to this initializer. | |
| void | addRelativeOffset (llvm::IntegerType *type, llvm::Constant *target) |
| Add a relative offset to the given target address, i.e. | |
| void | addRelativeOffsetToPosition (llvm::IntegerType *type, llvm::Constant *target, size_t position) |
| Same as addRelativeOffset(), but instead relative to an element in this aggregate, identified by its index. | |
| void | addTaggedRelativeOffset (llvm::IntegerType *type, llvm::Constant *address, unsigned tag) |
| Add a relative offset to the target address, plus a small constant offset. | |
| CharUnits | getNextOffsetFromGlobal () const |
| Return the offset from the start of the initializer to the next position, assuming no padding is required prior to it. | |
| PlaceholderPosition | addPlaceholder () |
| Add a placeholder value to the structure. | |
| PlaceholderPosition | addPlaceholderWithSize (llvm::Type *expectedType) |
| Add a placeholder, giving the expected type that will be filled in. | |
| void | fillPlaceholderWithInt (PlaceholderPosition position, llvm::IntegerType *type, uint64_t value, bool isSigned=false) |
| Fill a previously-added placeholder. | |
| void | fillPlaceholder (PlaceholderPosition position, llvm::Constant *value) |
| Fill a previously-added placeholder. | |
| llvm::Constant * | getAddrOfCurrentPosition (llvm::Type *type) |
| Produce an address which will eventually point to the next position to be filled. | |
| llvm::Constant * | getAddrOfPosition (llvm::Type *type, size_t position) |
| Produce an address which points to a position in the aggregate being constructed. | |
| llvm::ArrayRef< llvm::Constant * > | getGEPIndicesToCurrentPosition (llvm::SmallVectorImpl< llvm::Constant * > &indices) |
| Protected Member Functions inherited from clang::CodeGen::ConstantStructBuilderTemplateBase< ConstantInitBuilderTraits > | |
| ConstantStructBuilderTemplateBase (InitBuilder &builder, AggregateBuilderBase *parent, llvm::StructType *structTy) | |
| Protected Member Functions inherited from clang::CodeGen::ConstantAggregateBuilderTemplateBase< ConstantInitBuilderTraits::StructBuilder, ConstantInitBuilderTraits > | |
| ConstantAggregateBuilderTemplateBase (InitBuilder &builder, AggregateBuilderBase *parent) | |
| ConstantInitBuilderTraits::StructBuilder & | asImpl () |
| Protected Member Functions inherited from clang::CodeGen::ConstantAggregateBuilderBase | |
| llvm::SmallVectorImpl< llvm::Constant * > & | getBuffer () |
| const llvm::SmallVectorImpl< llvm::Constant * > & | getBuffer () const |
| ConstantAggregateBuilderBase (ConstantInitBuilderBase &builder, ConstantAggregateBuilderBase *parent) | |
| ~ConstantAggregateBuilderBase () | |
| void | markFinished () |
| llvm::Constant * | finishArray (llvm::Type *eltTy) |
| llvm::Constant * | finishStruct (llvm::StructType *structTy) |
| Protected Attributes inherited from clang::CodeGen::ConstantAggregateBuilderBase | |
| ConstantInitBuilderBase & | Builder |
| ConstantAggregateBuilderBase * | Parent |
| size_t | Begin |
| size_t | CachedOffsetEnd = 0 |
| bool | Finished = false |
| bool | Frozen = false |
| bool | Packed = false |
| CharUnits | CachedOffsetFromGlobal |
A helper class of ConstantInitBuilder, used for building constant struct initializers.
Definition at line 564 of file ConstantInitBuilder.h.
|
friend |
Definition at line 571 of file ConstantInitBuilder.h.
|
friend |
Definition at line 567 of file ConstantInitBuilder.h.
References ConstantInitBuilderTemplateBase.
Referenced by ConstantInitBuilderTemplateBase.