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

ConstantArray - Constant Array Declarations. More...

#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
 getType - Specialize the getType() method to always return an ArrayType, which reduces the amount of casting needed in parts of the compiler.
void replaceUsesOfWithOnConstant (Value *From, Value *To, Use *U) override
 replaceUsesOfWithOnConstant - This method is a special form of User::replaceUsesOfWith (which does not work on constants) that does work on constants.

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 >
class Constant

Detailed Description

ConstantArray - Constant Array Declarations.

Definition at line 353 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 383 of file Constants.h.

References llvm::Value::getValueID().

Transparently provide more efficient getOperand methods.

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 376 of file Constants.h.

Referenced by ConstantArray(), 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 2849 of file Constants.cpp.

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


Friends And Related Function Documentation

friend class Constant [friend]

Definition at line 357 of file Constants.h.

friend struct ConstantAggrKeyType< ConstantArray > [friend]

Definition at line 354 of file Constants.h.


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