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

RValue - This trivial value class is used to represent the result of an expression that is evaluated. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CGValue.h"

Public Member Functions

 RValue ()
 
bool isScalar () const
 
bool isComplex () const
 
bool isAggregate () const
 
bool isVolatileQualified () const
 
llvm::Value * getScalarVal () const
 getScalarVal() - Return the Value* of this scalar value.
 
std::pair< llvm::Value *, llvm::Value * > getComplexVal () const
 getComplexVal - Return the real/imag components of this complex value.
 
Address getAggregateAddress () const
 getAggregateAddr() - Return the Value* of the address of the aggregate.
 
llvm::Value * getAggregatePointer (QualType PointeeType, CodeGenFunction &CGF) const
 

Static Public Member Functions

static RValue getIgnored ()
 
static RValue get (llvm::Value *V)
 
static RValue get (Address Addr, CodeGenFunction &CGF)
 
static RValue getComplex (llvm::Value *V1, llvm::Value *V2)
 
static RValue getComplex (const std::pair< llvm::Value *, llvm::Value * > &C)
 
static RValue getAggregate (Address addr, bool isVolatile=false)
 Convert an Address to an RValue.
 

Friends

struct DominatingValue< RValue >
 

Detailed Description

RValue - This trivial value class is used to represent the result of an expression that is evaluated.

It can be one of three things: either a simple LLVM SSA value, a pair of SSA values for complex numbers, or the address of an aggregate value in memory.

Definition at line 42 of file CGValue.h.

Constructor & Destructor Documentation

◆ RValue()

clang::CodeGen::RValue::RValue ( )
inline

Definition at line 62 of file CGValue.h.

Member Function Documentation

◆ get() [1/2]

static RValue clang::CodeGen::RValue::get ( Address  Addr,
CodeGenFunction CGF 
)
inlinestatic

Definition at line 105 of file CGValue.h.

References clang::CodeGen::Address::emitRawPointer(), and get().

◆ get() [2/2]

static RValue clang::CodeGen::RValue::get ( llvm::Value *  V)
inlinestatic

◆ getAggregate()

static RValue clang::CodeGen::RValue::getAggregate ( Address  addr,
bool  isVolatile = false 
)
inlinestatic

Convert an Address to an RValue.

If the Address is not signed, create an RValue using the unsigned address. Otherwise, resign the address using the provided type.

Definition at line 125 of file CGValue.h.

References AggregateAddr.

Referenced by clang::CodeGen::LValue::asAggregateRValue(), clang::CodeGen::AggValueSlot::asRValue(), and clang::CodeGen::CallArg::getRValue().

◆ getAggregateAddress()

Address clang::CodeGen::RValue::getAggregateAddress ( ) const
inline

getAggregateAddr() - Return the Value* of the address of the aggregate.

Definition at line 83 of file CGValue.h.

References AggregateAddr, and isAggregate().

Referenced by clang::CodeGen::CallArg::copyInto(), clang::CodeGen::CGObjCRuntime::destroyCalleeDestroyedArguments(), and getAggregatePointer().

◆ getAggregatePointer()

llvm::Value * clang::CodeGen::RValue::getAggregatePointer ( QualType  PointeeType,
CodeGenFunction CGF 
) const
inline

Definition at line 88 of file CGValue.h.

References getAggregateAddress(), and clang::CodeGen::Address::getBasePointer().

◆ getComplex() [1/2]

static RValue clang::CodeGen::RValue::getComplex ( const std::pair< llvm::Value *, llvm::Value * > &  C)
inlinestatic

Definition at line 115 of file CGValue.h.

References clang::C, and getComplex().

◆ getComplex() [2/2]

static RValue clang::CodeGen::RValue::getComplex ( llvm::Value *  V1,
llvm::Value *  V2 
)
inlinestatic

Definition at line 108 of file CGValue.h.

References Vals.

Referenced by complexTempStructure(), convertToType(), emitInitWithReductionInitializer(), and getComplex().

◆ getComplexVal()

std::pair< llvm::Value *, llvm::Value * > clang::CodeGen::RValue::getComplexVal ( ) const
inline

getComplexVal - Return the real/imag components of this complex value.

Definition at line 78 of file CGValue.h.

References Vals.

Referenced by convertToComplexValue(), convertToScalarValue(), clang::CodeGen::CallArg::copyInto(), and EmitAtomicUpdateValue().

◆ getIgnored()

static RValue clang::CodeGen::RValue::getIgnored ( )
inlinestatic

◆ getScalarVal()

llvm::Value * clang::CodeGen::RValue::getScalarVal ( ) const
inline

◆ isAggregate()

bool clang::CodeGen::RValue::isAggregate ( ) const
inline

◆ isComplex()

bool clang::CodeGen::RValue::isComplex ( ) const
inline

◆ isScalar()

bool clang::CodeGen::RValue::isScalar ( ) const
inline

◆ isVolatileQualified()

bool clang::CodeGen::RValue::isVolatileQualified ( ) const
inline

Definition at line 68 of file CGValue.h.

Referenced by clang::CodeGen::CallArg::copyInto().

Friends And Related Function Documentation

◆ DominatingValue< RValue >

friend struct DominatingValue< RValue >
friend

Definition at line 159 of file CGValue.h.

Member Data Documentation

◆ AggregateAddr

Address clang::CodeGen::RValue::AggregateAddr

Definition at line 55 of file CGValue.h.

Referenced by getAggregate(), and getAggregateAddress().

◆ first

llvm::Value* clang::CodeGen::RValue::first

Definition at line 50 of file CGValue.h.

Referenced by get().

◆ second

llvm::Value* clang::CodeGen::RValue::second

Definition at line 51 of file CGValue.h.

Referenced by emitOMPAtomicCaptureExpr().

◆ 

struct { ... } clang::CodeGen::RValue::Vals

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