clang  6.0.0svn
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
clang::CodeGen::ConstantStructBuilderTemplateBase< Traits > Class Template Reference

A template class designed to allow other frontends to easily customize the builder classes used by ConstantInitBuilder, and thus to extend the API to work with the abstractions they prefer. More...

#include "clang/CodeGen/ConstantInitBuilder.h"

Inheritance diagram for clang::CodeGen::ConstantStructBuilderTemplateBase< Traits >:
Inheritance graph
[legend]
Collaboration diagram for clang::CodeGen::ConstantStructBuilderTemplateBase< Traits >:
Collaboration graph
[legend]

Public Types

using InitBuilder = typename Traits::InitBuilder
 
using AggregateBuilderBase = typename Traits::AggregateBuilderBase
 
- Public Types inherited from clang::CodeGen::ConstantAggregateBuilderTemplateBase< Traits::StructBuilder, Traits >
using InitBuilder = typename Traits::InitBuilder
 
using ArrayBuilder = typename Traits::ArrayBuilder
 
using StructBuilder = typename Traits::StructBuilder
 
using AggregateBuilderBase = typename Traits::AggregateBuilderBase
 

Public Member Functions

void setPacked (bool packed)
 
void suggestType (llvm::StructType *structTy)
 Use the given type for the struct if its element count is correct. More...
 
- Public Member Functions inherited from clang::CodeGen::ConstantAggregateBuilderTemplateBase< Traits::StructBuilder, Traits >
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...
 

Protected Member Functions

 ConstantStructBuilderTemplateBase (InitBuilder &builder, AggregateBuilderBase *parent, llvm::StructType *structTy)
 
- Protected Member Functions inherited from clang::CodeGen::ConstantAggregateBuilderTemplateBase< Traits::StructBuilder, Traits >
 ConstantAggregateBuilderTemplateBase (InitBuilder &builder, AggregateBuilderBase *parent)
 
Traits::StructBuilder & asImpl ()
 

Friends

template<class , class >
class ConstantAggregateBuilderTemplateBase
 

Detailed Description

template<class Traits>
class clang::CodeGen::ConstantStructBuilderTemplateBase< Traits >

A template class designed to allow other frontends to easily customize the builder classes used by ConstantInitBuilder, and thus to extend the API to work with the abstractions they prefer.

This would probably not be necessary if C++ just supported extension methods.

Definition at line 435 of file ConstantInitBuilder.h.

Member Typedef Documentation

◆ AggregateBuilderBase

template<class Traits>
using clang::CodeGen::ConstantStructBuilderTemplateBase< Traits >::AggregateBuilderBase = typename Traits::AggregateBuilderBase

Definition at line 443 of file ConstantInitBuilder.h.

◆ InitBuilder

template<class Traits>
using clang::CodeGen::ConstantStructBuilderTemplateBase< Traits >::InitBuilder = typename Traits::InitBuilder

Definition at line 442 of file ConstantInitBuilder.h.

Constructor & Destructor Documentation

◆ ConstantStructBuilderTemplateBase()

template<class Traits>
clang::CodeGen::ConstantStructBuilderTemplateBase< Traits >::ConstantStructBuilderTemplateBase ( InitBuilder builder,
AggregateBuilderBase parent,
llvm::StructType *  structTy 
)
inlineprotected

Definition at line 452 of file ConstantInitBuilder.h.

Member Function Documentation

◆ setPacked()

template<class Traits>
void clang::CodeGen::ConstantStructBuilderTemplateBase< Traits >::setPacked ( bool  packed)
inline

Definition at line 460 of file ConstantInitBuilder.h.

◆ suggestType()

template<class Traits>
void clang::CodeGen::ConstantStructBuilderTemplateBase< Traits >::suggestType ( llvm::StructType *  structTy)
inline

Use the given type for the struct if its element count is correct.

Don't add more elements after calling this.

Definition at line 466 of file ConstantInitBuilder.h.

Friends And Related Function Documentation

◆ ConstantAggregateBuilderTemplateBase

template<class Traits>
template<class , class >
friend class ConstantAggregateBuilderTemplateBase
friend

Definition at line 449 of file ConstantInitBuilder.h.


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