LLVM API Documentation

llvm::ConstantPacked Class Reference

#include <Constants.h>

Inheritance diagram for llvm::ConstantPacked:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

const PackedTypegetType () const
virtual bool isNullValue () const
virtual void destroyConstant ()
virtual void replaceUsesOfWithOnConstant (Value *From, Value *To, Use *U)

Static Public Member Functions

static Constantget (const PackedType *T, const std::vector< Constant * > &)
 get() - Static factory methods - Return objects of the specified value
static Constantget (const std::vector< Constant * > &V)
static bool classof (const ConstantPacked *)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Value *V)

Protected Member Functions

 ConstantPacked (const PackedType *T, const std::vector< Constant * > &Val)
 ~ConstantPacked ()

Friends

struct ConstantCreator< ConstantPacked, PackedType, std::vector< Constant * > >

Detailed Description

ConstantPacked - Constant Packed Declarations

Definition at line 431 of file Constants.h.


Constructor & Destructor Documentation

ConstantPacked::ConstantPacked ( const PackedType T,
const std::vector< Constant * > &  Val 
) [protected]

Definition at line 291 of file Constants.cpp.

References C, E, llvm::Type::getTypeID(), llvm::Use::init(), llvm::Type::isAbstract(), llvm::User::OperandList, and T.

ConstantPacked::~ConstantPacked (  )  [protected]

Definition at line 306 of file Constants.cpp.

References llvm::User::OperandList.


Member Function Documentation

Constant * ConstantPacked::get ( const PackedType T,
const std::vector< Constant * > &   
) [static]

get() - Static factory methods - Return objects of the specified value

Definition at line 1165 of file Constants.cpp.

References C, llvm::ConstantAggregateZero::get(), and PackedConstants.

Referenced by llvm::ConstantFoldInsertElementInstruction(), llvm::ConvertConstantType< ConstantPacked, PackedType >::convert(), llvm::BinaryOperator::createNot(), get(), llvm::MapValue(), llvm::BytecodeReader::ParseConstantPoolValue(), and replaceUsesOfWithOnConstant().

Constant * ConstantPacked::get ( const std::vector< Constant * > &  V  )  [static]

Definition at line 1179 of file Constants.cpp.

References llvm::PackedType::get(), and get().

const PackedType* llvm::ConstantPacked::getType (  )  const [inline]

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

Reimplemented from llvm::Value.

Definition at line 446 of file Constants.h.

References llvm::Value::getType().

Referenced by replaceUsesOfWithOnConstant().

virtual bool llvm::ConstantPacked::isNullValue (  )  const [inline, virtual]

isNullValue - Return true if this is the value that would be returned by getNullValue. This always returns false because zero arrays are always created as ConstantAggregateZero objects.

Implements llvm::Constant.

Definition at line 453 of file Constants.h.

void ConstantPacked::destroyConstant (  )  [virtual]

destroyConstant - Called if some element of this constant is no longer valid. At this point only other constants may be on the use_list for this constant. Any constants on our Use list must also be destroy'd. The implementation must be sure to remove the constant from the list of available cached constants. Implementations should call destroyConstantImpl as the last thing they do, to destroy all users and delete this.

Reimplemented from llvm::Constant.

Definition at line 1186 of file Constants.cpp.

References llvm::Constant::destroyConstantImpl(), and PackedConstants.

Referenced by llvm::ConvertConstantType< ConstantPacked, PackedType >::convert(), and replaceUsesOfWithOnConstant().

void ConstantPacked::replaceUsesOfWithOnConstant ( Value From,
Value To,
Use U 
) [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 1755 of file Constants.cpp.

References destroyConstant(), get(), llvm::User::getNumOperands(), llvm::Constant::getOperand(), getType(), Replacement, llvm::Value::uncheckedReplaceAllUsesWith(), and Val.

static bool llvm::ConstantPacked::classof ( const ConstantPacked  )  [inline, static]

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

Definition at line 459 of file Constants.h.

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

Reimplemented from llvm::Constant.

Definition at line 460 of file Constants.h.

References llvm::Value::ConstantPackedVal, and V.


Friends And Related Function Documentation

friend struct ConstantCreator< ConstantPacked, PackedType,std::vector< Constant * > > [friend]

Definition at line 433 of file Constants.h.


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