clang 20.0.0git
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
clang::CodeGen::ConstantInitFuture Class Reference

A "future" for a completed constant initializer, which can be passed around independently of any sub-builders (but not the original parent). More...

#include "clang/CodeGen/ConstantInitFuture.h"

Public Member Functions

 ConstantInitFuture ()
 
 ConstantInitFuture (llvm::Constant *initializer)
 A future can be explicitly created from a fixed initializer.
 
 operator bool () const
 Is this future non-null?
 
llvm::Type * getType () const
 Return the type of the initializer.
 
void abandon ()
 Abandon this initializer.
 
void installInGlobal (llvm::GlobalVariable *global)
 Install the initializer into a global variable.
 
void * getOpaqueValue () const
 

Static Public Member Functions

static ConstantInitFuture getFromOpaqueValue (void *value)
 

Static Public Attributes

static constexpr int NumLowBitsAvailable
 

Friends

class ConstantInitBuilderBase
 

Detailed Description

A "future" for a completed constant initializer, which can be passed around independently of any sub-builders (but not the original parent).

Definition at line 47 of file ConstantInitFuture.h.

Constructor & Destructor Documentation

◆ ConstantInitFuture() [1/2]

clang::CodeGen::ConstantInitFuture::ConstantInitFuture ( )
inline

Definition at line 56 of file ConstantInitFuture.h.

◆ ConstantInitFuture() [2/2]

clang::CodeGen::ConstantInitFuture::ConstantInitFuture ( llvm::Constant *  initializer)
inlineexplicit

A future can be explicitly created from a fixed initializer.

Definition at line 59 of file ConstantInitFuture.h.

Member Function Documentation

◆ abandon()

void ConstantInitFuture::abandon ( )

Abandon this initializer.

Definition at line 30 of file ConstantInitBuilder.cpp.

◆ getFromOpaqueValue()

static ConstantInitFuture clang::CodeGen::ConstantInitFuture::getFromOpaqueValue ( void *  value)
inlinestatic

Definition at line 77 of file ConstantInitFuture.h.

◆ getOpaqueValue()

void * clang::CodeGen::ConstantInitFuture::getOpaqueValue ( ) const
inline

◆ getType()

llvm::Type * ConstantInitFuture::getType ( ) const

Return the type of the initializer.

Definition at line 21 of file ConstantInitBuilder.cpp.

References getType().

Referenced by getType().

◆ installInGlobal()

void ConstantInitFuture::installInGlobal ( llvm::GlobalVariable *  global)

Install the initializer into a global variable.

This cannot be called multiple times.

Definition at line 38 of file ConstantInitBuilder.cpp.

◆ operator bool()

clang::CodeGen::ConstantInitFuture::operator bool ( ) const
inlineexplicit

Is this future non-null?

Definition at line 64 of file ConstantInitFuture.h.

References bool, and Data.

Friends And Related Function Documentation

◆ ConstantInitBuilderBase

friend class ConstantInitBuilderBase
friend

Definition at line 52 of file ConstantInitFuture.h.

Member Data Documentation

◆ NumLowBitsAvailable

constexpr int clang::CodeGen::ConstantInitFuture::NumLowBitsAvailable
staticconstexpr

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