LLVM API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
llvm::ConstantArray Class Reference

#include <Constants.h>

Inheritance diagram for llvm::ConstantArray:
Inheritance graph
[legend]
Collaboration diagram for llvm::ConstantArray:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Constant)
 Transparently provide more efficient getOperand methods.
ArrayTypegetType () const
void destroyConstant () override
void replaceUsesOfWithOnConstant (Value *From, Value *To, Use *U) override

Static Public Member Functions

static Constantget (ArrayType *T, ArrayRef< Constant * > V)
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Protected Member Functions

 ConstantArray (ArrayType *T, ArrayRef< Constant * > Val)

Friends

struct ConstantAggrKeyType< ConstantArray >

Detailed Description

ConstantArray - Constant Array Declarations

Definition at line 336 of file Constants.h.


Constructor & Destructor Documentation

ConstantArray::ConstantArray ( ArrayType T,
ArrayRef< Constant * >  Val 
) [protected]

Member Function Documentation

static bool llvm::ConstantArray::classof ( const Value V) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented from llvm::Constant.

Definition at line 363 of file Constants.h.

References llvm::Value::ConstantArrayVal, and llvm::Value::getValueID().

Transparently provide more efficient getOperand methods.

void ConstantArray::destroyConstant ( ) [override, virtual]

destroyConstant - Remove the constant from the constant table...

Reimplemented from llvm::Constant.

Definition at line 1350 of file Constants.cpp.

References llvm::LLVMContextImpl::ArrayConstants, llvm::Constant::destroyConstantImpl(), llvm::Type::getContext(), getType(), llvm::LLVMContext::pImpl, and llvm::ConstantUniqueMap< ConstantClass >::remove().

Constant * ConstantArray::get ( ArrayType T,
ArrayRef< Constant * >  V 
) [static]

getType - Specialize the getType() method to always return an ArrayType, which reduces the amount of casting needed in parts of the compiler.

Reimplemented from llvm::Value.

Definition at line 355 of file Constants.h.

Referenced by ConstantArray(), destroyConstant(), emitGlobalConstantArray(), and replaceUsesOfWithOnConstant().

void ConstantArray::replaceUsesOfWithOnConstant ( Value ,
Value ,
Use  
) [override, virtual]

replaceUsesOfWithOnConstant - This method is a special form of User::replaceUsesOfWith (which does not work on constants) that does work on constants. Basically this method goes through the trouble of building a new constant that is equivalent to the current one, with all uses of From replaced with uses of To. After this construction is completed, all of the users of 'this' are replaced to use the new constant, and then 'this' is deleted. In general, you should not call this method, instead, use Value::replaceAllUsesWith, which automatically dispatches to this method as needed.

Reimplemented from llvm::Constant.

Definition at line 2754 of file Constants.cpp.

References llvm::ConstantAggregateZero::get(), llvm::UndefValue::get(), llvm::Value::getContext(), llvm::User::getNumOperands(), getType(), llvm::Constant::isNullValue(), llvm::User::OperandList, llvm::Constant::replaceUsesOfWithOnConstantImpl(), and llvm::SmallVectorImpl< T >::reserve().


Friends And Related Function Documentation

friend struct ConstantAggrKeyType< ConstantArray > [friend]

Definition at line 337 of file Constants.h.


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