LLVM API Documentation
#include <Constants.h>
Inheritance diagram for llvm::ConstantStruct:
Public Member Functions | |
const StructType * | getType () const |
virtual bool | isNullValue () const |
virtual void | destroyConstant () |
virtual void | replaceUsesOfWithOnConstant (Value *From, Value *To, Use *U) |
Static Public Member Functions | |
static Constant * | get (const StructType *T, const std::vector< Constant * > &V) |
static Constant * | get (const std::vector< Constant * > &V) |
static bool | classof (const ConstantStruct *) |
Methods for support type inquiry through isa, cast, and dyn_cast:. | |
static bool | classof (const Value *V) |
Protected Member Functions | |
ConstantStruct (const StructType *T, const std::vector< Constant * > &Val) | |
~ConstantStruct () | |
Friends | |
struct | ConstantCreator< ConstantStruct, StructType,std::vector< Constant * > > |
Definition at line 385 of file Constants.h.
ConstantStruct::ConstantStruct | ( | const StructType * | T, | |
const std::vector< Constant * > & | Val | |||
) | [protected] |
Definition at line 266 of file Constants.cpp.
References llvm::CallingConv::C, E, getTypeID(), I, llvm::User::OperandList, and T.
ConstantStruct::~ConstantStruct | ( | ) | [protected] |
static bool llvm::ConstantStruct::classof | ( | const Value * | V | ) | [inline, static] |
Reimplemented from llvm::Constant.
Definition at line 416 of file Constants.h.
References llvm::Value::ConstantStructVal, and V.
static bool llvm::ConstantStruct::classof | ( | const ConstantStruct * | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Definition at line 415 of file Constants.h.
void ConstantStruct::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 1024 of file Constants.cpp.
References llvm::Constant::destroyConstantImpl().
Referenced by llvm::ConvertConstantType< ConstantStruct, StructType >::convert(), and replaceUsesOfWithOnConstant().
Constant * ConstantStruct::get | ( | const StructType * | T, | |
const std::vector< Constant * > & | V | |||
) | [static] |
get() - Static factory methods - Return objects of the specified value
Definition at line 1004 of file Constants.cpp.
References llvm::ConstantAggregateZero::get(), and isNullValue().
Referenced by llvm::ConvertConstantType< ConstantStruct, StructType >::convert(), get(), llvm::X86TargetLowering::LowerOperation(), llvm::MapValue(), llvm::BytecodeReader::ParseConstantPoolValue(), llvm::DISerializer::Serialize(), and llvm::AllocInfo::toConstant().
const StructType* llvm::ConstantStruct::getType | ( | ) | const [inline] |
getType() specialization - Reduce amount of casting...
Reimplemented from llvm::Value.
Definition at line 400 of file Constants.h.
References llvm::Value::getType().
Referenced by llvm::ExecutionEngine::InitializeMemory(), and replaceUsesOfWithOnConstant().
virtual bool llvm::ConstantStruct::isNullValue | ( | ) | const [inline, virtual] |
isNullValue - Return true if this is the value that would be returned by getNullValue. This always returns false because zero structs are always created as ConstantAggregateZero objects.
Implements llvm::Constant.
Definition at line 407 of file Constants.h.
Referenced by get().
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 1584 of file Constants.cpp.
References destroyConstant(), E, llvm::ConstantAggregateZero::get(), llvm::User::getNumOperands(), llvm::Constant::getOperand(), getType(), llvm::Constant::isNullValue(), Lookup(), O, llvm::User::OperandList, Replacement, llvm::Constant::setOperand(), U, llvm::Value::uncheckedReplaceAllUsesWith(), and Val.
friend struct ConstantCreator< ConstantStruct, StructType,std::vector< Constant * > > [friend] |
Definition at line 387 of file Constants.h.