clang  5.0.0
Friends | List of all members
clang::CodeGen::ConstantArrayBuilder Class Reference

A helper class of ConstantInitBuilder, used for building constant array initializers. More...

#include "clang/CodeGen/ConstantInitBuilder.h"

Inheritance diagram for clang::CodeGen::ConstantArrayBuilder:
[legend]
Collaboration diagram for clang::CodeGen::ConstantArrayBuilder:
[legend]

Friends

template<class Traits >
class ConstantInitBuilderTemplateBase
 
template<class Impl , class Traits >
class CodeGen::ConstantAggregateBuilderTemplateBase
 

Additional Inherited Members

- Public Types inherited from clang::CodeGen::ConstantArrayBuilderTemplateBase< ConstantInitBuilderTraits >
using InitBuilder = typename ConstantInitBuilderTraits::InitBuilder
 
using AggregateBuilderBase = typename ConstantInitBuilderTraits::AggregateBuilderBase
 
- Public Types inherited from clang::CodeGen::ConstantAggregateBuilderTemplateBase< ConstantInitBuilderTraits::ArrayBuilder, ConstantInitBuilderTraits >
using InitBuilder = typename ConstantInitBuilderTraits::InitBuilder
 
using ArrayBuilder = typename ConstantInitBuilderTraits::ArrayBuilder
 
using StructBuilder = typename ConstantInitBuilderTraits::StructBuilder
 
using AggregateBuilderBase = typename ConstantInitBuilderTraits::AggregateBuilderBase
 
- Public Member Functions inherited from clang::CodeGen::ConstantAggregateBuilderTemplateBase< ConstantInitBuilderTraits::ArrayBuilder, 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. More...
 
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. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from clang::CodeGen::ConstantAggregateBuilderBase
 ConstantAggregateBuilderBase (const ConstantAggregateBuilderBase &)=delete
 
ConstantAggregateBuilderBaseoperator= (const ConstantAggregateBuilderBase &)=delete
 
 ConstantAggregateBuilderBase (ConstantAggregateBuilderBase &&other)
 
ConstantAggregateBuilderBaseoperator= (ConstantAggregateBuilderBase &&other)=delete
 
size_t size () const
 Return the number of elements that have been added to this struct or array. More...
 
bool empty () const
 Return true if no elements have yet been added to this struct or array. More...
 
void abandon ()
 Abandon this builder completely. More...
 
void add (llvm::Constant *value)
 Add a new value to this initializer. More...
 
void addSize (CharUnits size)
 Add an integer value of type size_t. More...
 
void addInt (llvm::IntegerType *intTy, uint64_t value, bool isSigned=false)
 Add an integer value of a specific type. More...
 
void addNullPointer (llvm::PointerType *ptrTy)
 Add a null pointer of a specific type. More...
 
void addBitCast (llvm::Constant *value, llvm::Type *type)
 Add a bitcast of a value to a specific type. More...
 
void addAll (llvm::ArrayRef< llvm::Constant * > values)
 Add a bunch of new values to this initializer. More...
 
void addRelativeOffset (llvm::IntegerType *type, llvm::Constant *target)
 Add a relative offset to the given target address, i.e. More...
 
void addTaggedRelativeOffset (llvm::IntegerType *type, llvm::Constant *address, unsigned tag)
 Add a relative offset to the target address, plus a small constant offset. More...
 
CharUnits getNextOffsetFromGlobal () const
 Return the offset from the start of the initializer to the next position, assuming no padding is required prior to it. More...
 
PlaceholderPosition addPlaceholder ()
 Add a placeholder value to the structure. More...
 
PlaceholderPosition addPlaceholderWithSize (llvm::Type *expectedType)
 Add a placeholder, giving the expected type that will be filled in. More...
 
void fillPlaceholderWithInt (PlaceholderPosition position, llvm::IntegerType *type, uint64_t value, bool isSigned=false)
 Fill a previously-added placeholder. More...
 
void fillPlaceholder (PlaceholderPosition position, llvm::Constant *value)
 Fill a previously-added placeholder. More...
 
llvm::Constant * getAddrOfCurrentPosition (llvm::Type *type)
 Produce an address which will eventually point to the the next position to be filled. More...
 
llvm::ArrayRef< llvm::Constant * > getGEPIndicesToCurrentPosition (llvm::SmallVectorImpl< llvm::Constant * > &indices)
 
- Protected Member Functions inherited from clang::CodeGen::ConstantArrayBuilderTemplateBase< ConstantInitBuilderTraits >
 ConstantArrayBuilderTemplateBase (InitBuilder &builder, AggregateBuilderBase *parent, llvm::Type *eltTy)
 
- Protected Member Functions inherited from clang::CodeGen::ConstantAggregateBuilderTemplateBase< ConstantInitBuilderTraits::ArrayBuilder, ConstantInitBuilderTraits >
 ConstantAggregateBuilderTemplateBase (InitBuilder &builder, AggregateBuilderBase *parent)
 
ConstantInitBuilderTraits::ArrayBuilderasImpl ()
 
- 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
ConstantInitBuilderBaseBuilder
 
ConstantAggregateBuilderBaseParent
 
size_t Begin
 
size_t CachedOffsetEnd = 0
 
bool Finished = false
 
bool Frozen = false
 
bool Packed = false
 
CharUnits CachedOffsetFromGlobal
 

Detailed Description

A helper class of ConstantInitBuilder, used for building constant array initializers.

Definition at line 526 of file ConstantInitBuilder.h.

Friends And Related Function Documentation

template<class Impl , class Traits >
friend class CodeGen::ConstantAggregateBuilderTemplateBase
friend

Definition at line 533 of file ConstantInitBuilder.h.

template<class Traits >
friend class ConstantInitBuilderTemplateBase
friend

Definition at line 529 of file ConstantInitBuilder.h.


The documentation for this class was generated from the following file: