class AggValueSlot

Declaration

class AggValueSlot { /* full declaration omitted */ };

Description

An aggregate value slot.

Declared at: clang/lib/CodeGen/CGValue.h:491

Member Variables

private clang::CodeGen::Address Addr
The address.
private clang::Qualifiers Quals
private bool DestructedFlag
DestructedFlag - This is set to true if some external code is responsible for setting up a destructor for the slot. Otherwise the code which constructs it should push the appropriate cleanup.
private bool ObjCGCFlag
ObjCGCFlag - This is set to true if writing to the memory in the slot might require calling an appropriate Objective-C GC barrier. The exact interaction here is unnecessarily mysterious.
private bool ZeroedFlag
ZeroedFlag - This is set to true if the memory in the slot is known to be zero before the assignment into it. This means that zero fields don't need to be set.
private bool AliasedFlag
This flag controls whether calls that produce the aggregate value may be evaluated directly into the slot, or whether they must be evaluated into an unaliased temporary and then memcpy'ed over. Since it's invalid in general to memcpy a non-POD C++ object, it's important that this flag never be set when evaluating an expression which constructs such an object.
private bool OverlapFlag
This is set to true if the tail padding of this slot might overlap another object that may have already been initialized (and whose value must be preserved by this initialization). If so, we may only store up to the dsize of the type. Otherwise we can widen stores to the size of the type.
private bool SanitizerCheckedFlag
If is set to true, sanitizer checks are already generated for this address or not required. For instance, if this address represents an object created in 'new' expression, sanitizer checks for memory is made as a part of 'operator new' emission and object constructor should not generate them.

Method Overview

  • private AggValueSlot(clang::CodeGen::Address Addr, clang::Qualifiers Quals, bool DestructedFlag, bool ObjCGCFlag, bool ZeroedFlag, bool AliasedFlag, bool OverlapFlag, bool SanitizerCheckedFlag)
  • public clang::CodeGen::RValue asRValue() const
  • public static clang::CodeGen::AggValueSlot forAddr(clang::CodeGen::Address addr, clang::Qualifiers quals, clang::CodeGen::AggValueSlot::IsDestructed_t isDestructed, clang::CodeGen::AggValueSlot::NeedsGCBarriers_t needsGC, clang::CodeGen::AggValueSlot::IsAliased_t isAliased, clang::CodeGen::AggValueSlot::Overlap_t mayOverlap, clang::CodeGen::AggValueSlot::IsZeroed_t isZeroed = IsNotZeroed, clang::CodeGen::AggValueSlot::IsSanitizerChecked_t isChecked = IsNotSanitizerChecked)
  • public static clang::CodeGen::AggValueSlot forLValue(const clang::CodeGen::LValue & LV, clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::AggValueSlot::IsDestructed_t isDestructed, clang::CodeGen::AggValueSlot::NeedsGCBarriers_t needsGC, clang::CodeGen::AggValueSlot::IsAliased_t isAliased, clang::CodeGen::AggValueSlot::Overlap_t mayOverlap, clang::CodeGen::AggValueSlot::IsZeroed_t isZeroed = IsNotZeroed, clang::CodeGen::AggValueSlot::IsSanitizerChecked_t isChecked = IsNotSanitizerChecked)
  • public clang::CodeGen::Address getAddress() const
  • public clang::CharUnits getAlignment() const
  • public Qualifiers::ObjCLifetime getObjCLifetime() const
  • public llvm::Value * getPointer() const
  • public clang::CharUnits getPreferredSize(clang::ASTContext & Ctx, clang::QualType Type) const
  • public clang::Qualifiers getQualifiers() const
  • public static clang::CodeGen::AggValueSlot ignored()
  • public clang::CodeGen::AggValueSlot::IsDestructed_t isExternallyDestructed() const
  • public bool isIgnored() const
  • public clang::CodeGen::AggValueSlot::IsAliased_t isPotentiallyAliased() const
  • public bool isSanitizerChecked() const
  • public bool isVolatile() const
  • public clang::CodeGen::AggValueSlot::IsZeroed_t isZeroed() const
  • public clang::CodeGen::AggValueSlot::Overlap_t mayOverlap() const
  • public clang::CodeGen::AggValueSlot::NeedsGCBarriers_t requiresGCollection() const
  • public void setExternallyDestructed(bool destructed = true)
  • public void setVolatile(bool flag)
  • public void setZeroed(bool V = true)

Methods

AggValueSlot(clang::CodeGen::Address Addr,
             clang::Qualifiers Quals,
             bool DestructedFlag,
             bool ObjCGCFlag,
             bool ZeroedFlag,
             bool AliasedFlag,
             bool OverlapFlag,
             bool SanitizerCheckedFlag)

Declared at: clang/lib/CodeGen/CGValue.h:541

Parameters

clang::CodeGen::Address Addr
clang::Qualifiers Quals
bool DestructedFlag
bool ObjCGCFlag
bool ZeroedFlag
bool AliasedFlag
bool OverlapFlag
bool SanitizerCheckedFlag

clang::CodeGen::RValue asRValue() const

Declared at: clang/lib/CodeGen/CGValue.h:651

static clang::CodeGen::AggValueSlot forAddr(
    clang::CodeGen::Address addr,
    clang::Qualifiers quals,
    clang::CodeGen::AggValueSlot::IsDestructed_t
        isDestructed,
    clang::CodeGen::AggValueSlot::
        NeedsGCBarriers_t needsGC,
    clang::CodeGen::AggValueSlot::IsAliased_t
        isAliased,
    clang::CodeGen::AggValueSlot::Overlap_t
        mayOverlap,
    clang::CodeGen::AggValueSlot::IsZeroed_t
        isZeroed = IsNotZeroed,
    clang::CodeGen::AggValueSlot::
        IsSanitizerChecked_t isChecked =
            IsNotSanitizerChecked)

Description

forAddr - Make a slot for an aggregate value.

Declared at: clang/lib/CodeGen/CGValue.h:574

Parameters

clang::CodeGen::Address addr
clang::Qualifiers quals
- The qualifiers that dictate how the slot should be initialied. Only 'volatile' and the Objective-C lifetime qualifiers matter.
clang::CodeGen::AggValueSlot::IsDestructed_t isDestructed
- true if something else is responsible for calling destructors on this object
clang::CodeGen::AggValueSlot::NeedsGCBarriers_t needsGC
- true if the slot is potentially located somewhere that ObjC GC calls should be emitted for
clang::CodeGen::AggValueSlot::IsAliased_t isAliased
clang::CodeGen::AggValueSlot::Overlap_t mayOverlap
clang::CodeGen::AggValueSlot::IsZeroed_t isZeroed = IsNotZeroed
clang::CodeGen::AggValueSlot::IsSanitizerChecked_t isChecked = IsNotSanitizerChecked

static clang::CodeGen::AggValueSlot forLValue(
    const clang::CodeGen::LValue& LV,
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::AggValueSlot::IsDestructed_t
        isDestructed,
    clang::CodeGen::AggValueSlot::
        NeedsGCBarriers_t needsGC,
    clang::CodeGen::AggValueSlot::IsAliased_t
        isAliased,
    clang::CodeGen::AggValueSlot::Overlap_t
        mayOverlap,
    clang::CodeGen::AggValueSlot::IsZeroed_t
        isZeroed = IsNotZeroed,
    clang::CodeGen::AggValueSlot::
        IsSanitizerChecked_t isChecked =
            IsNotSanitizerChecked)

Declared at: clang/lib/CodeGen/CGValue.h:587

Parameters

const clang::CodeGen::LValue& LV
clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::AggValueSlot::IsDestructed_t isDestructed
clang::CodeGen::AggValueSlot::NeedsGCBarriers_t needsGC
clang::CodeGen::AggValueSlot::IsAliased_t isAliased
clang::CodeGen::AggValueSlot::Overlap_t mayOverlap
clang::CodeGen::AggValueSlot::IsZeroed_t isZeroed = IsNotZeroed
clang::CodeGen::AggValueSlot::IsSanitizerChecked_t isChecked = IsNotSanitizerChecked

clang::CodeGen::Address getAddress() const

Declared at: clang/lib/CodeGen/CGValue.h:627

clang::CharUnits getAlignment() const

Declared at: clang/lib/CodeGen/CGValue.h:635

Qualifiers::ObjCLifetime getObjCLifetime() const

Declared at: clang/lib/CodeGen/CGValue.h:615

llvm::Value* getPointer() const

Declared at: clang/lib/CodeGen/CGValue.h:623

clang::CharUnits getPreferredSize(
    clang::ASTContext& Ctx,
    clang::QualType Type) const

Description

Get the preferred size to use when storing a value to this slot. This is the type size unless that might overlap another object, in which case it's the dsize.

Declared at: clang/lib/CodeGen/CGValue.h:667

Parameters

clang::ASTContext& Ctx
clang::QualType Type

clang::Qualifiers getQualifiers() const

Declared at: clang/lib/CodeGen/CGValue.h:602

static clang::CodeGen::AggValueSlot ignored()

Description

ignored - Returns an aggregate value slot indicating that the aggregate value is being ignored.

Declared at: clang/lib/CodeGen/CGValue.h:559

clang::CodeGen::AggValueSlot::IsDestructed_t
isExternallyDestructed() const

Declared at: clang/lib/CodeGen/CGValue.h:595

bool isIgnored() const

Declared at: clang/lib/CodeGen/CGValue.h:631

clang::CodeGen::AggValueSlot::IsAliased_t
isPotentiallyAliased() const

Declared at: clang/lib/CodeGen/CGValue.h:639

bool isSanitizerChecked() const

Declared at: clang/lib/CodeGen/CGValue.h:647

bool isVolatile() const

Declared at: clang/lib/CodeGen/CGValue.h:604

clang::CodeGen::AggValueSlot::IsZeroed_t
isZeroed() const

Declared at: clang/lib/CodeGen/CGValue.h:660

clang::CodeGen::AggValueSlot::Overlap_t
mayOverlap() const

Declared at: clang/lib/CodeGen/CGValue.h:643

clang::CodeGen::AggValueSlot::NeedsGCBarriers_t
requiresGCollection() const

Declared at: clang/lib/CodeGen/CGValue.h:619

void setExternallyDestructed(
    bool destructed = true)

Declared at: clang/lib/CodeGen/CGValue.h:598

Parameters

bool destructed = true

void setVolatile(bool flag)

Declared at: clang/lib/CodeGen/CGValue.h:608

Parameters

bool flag

void setZeroed(bool V = true)

Declared at: clang/lib/CodeGen/CGValue.h:659

Parameters

bool V = true