LLVM API Documentation
#include <Constant.h>
Inheritance diagram for llvm::Constant:
Public Member Functions | |
virtual void | setName (const std::string &name, SymbolTable *ST=0) |
virtual bool | isNullValue () const =0 |
virtual void | print (std::ostream &O) const |
Constant * | getOperand (unsigned i) |
const Constant * | getOperand (unsigned i) const |
void | setOperand (unsigned i, Constant *C) |
virtual void | destroyConstant () |
virtual void | replaceUsesOfWithOnConstant (Value *From, Value *To, bool DisableChecking=false) |
Static Public Member Functions | |
static Constant * | getNullValue (const Type *Ty) |
static bool | classof (const Constant *) |
static bool | classof (const GlobalValue *) |
static bool | classof (const Value *V) |
static void | clearAllValueMaps () |
Protected Member Functions | |
Constant (const Type *Ty, ValueTy vty=Value::SimpleConstantVal, const std::string &Name="") | |
~Constant () | |
void | destroyConstantImpl () |
Definition at line 21 of file Constant.h.
|
Definition at line 23 of file Constant.h. |
|
Definition at line 26 of file Constant.h. |
|
|
Reimplemented in llvm::GlobalValue. Definition at line 66 of file Constant.h. |
|
Definition at line 65 of file Constant.h. |
|
clearAllValueMaps - This method frees all internal memory used by the constant subsystem, which can be used in environments where this memory is otherwise reported as a leak. Definition at line 1417 of file Constants.cpp. References E. |
|
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 in llvm::ConstantAggregateZero, llvm::ConstantArray, llvm::ConstantStruct, llvm::ConstantPacked, llvm::ConstantPointerNull, llvm::ConstantExpr, llvm::UndefValue, and llvm::GlobalValue. Definition at line 62 of file Constant.h. Referenced by destroyConstantImpl(). |
|
|
|
Reimplemented from llvm::User. Reimplemented in llvm::ConstantExpr. Definition at line 48 of file Constant.h. References llvm::User::getOperand(). |
|
|
isNullValue - Return true if this is the value that would be returned by getNullValue. Implemented in llvm::ConstantIntegral, llvm::ConstantBool, llvm::ConstantInt, llvm::ConstantFP, llvm::ConstantAggregateZero, llvm::ConstantArray, llvm::ConstantStruct, llvm::ConstantPacked, llvm::ConstantPointerNull, llvm::ConstantExpr, llvm::UndefValue, and llvm::GlobalValue. Referenced by llvm::ConstantFoldGetElementPtr(), llvm::AsmPrinter::emitConstantValueOnly(), llvm::AsmPrinter::emitGlobalConstant(), evaluateRelation(), llvm::ConstantPacked::get(), llvm::ConstantArray::get(), and OptimizeOnceStoredGlobal(). |
|
print - Implement operator<< on Value... Implements llvm::Value. Reimplemented in llvm::Function, and llvm::GlobalVariable. Definition at line 1222 of file AsmWriter.cpp. References llvm::Type::getDescription(), llvm::Value::getType(), and WriteConstantInt(). |
|
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 in llvm::ConstantAggregateZero, llvm::ConstantArray, llvm::ConstantStruct, llvm::ConstantPacked, llvm::ConstantExpr, and llvm::GlobalVariable. Definition at line 86 of file Constant.h. References llvm::User::getNumOperands(). |
|
Reimplemented from llvm::Value. Reimplemented in llvm::Function, and llvm::GlobalVariable. Definition at line 35 of file Constants.cpp. References llvm::SymbolTable::insert(). Referenced by ForceRenaming(). |
|
Definition at line 51 of file Constant.h. References llvm::User::setOperand(). Referenced by AssociativeOpt(), and llvm::GlobalVariable::replaceUsesOfWithOnConstant(). |