LLVM API Documentation
#include <GlobalAlias.h>
Public Member Functions | |
void * | operator new (size_t s) |
GlobalAlias (Type *Ty, LinkageTypes Linkage, const Twine &Name="", Constant *Aliasee=0, Module *Parent=0) | |
DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Constant) | |
Provide fast operand accessors. More... | |
virtual void | removeFromParent () |
virtual void | eraseFromParent () |
void | setAliasee (Constant *GV) |
set/getAliasee - These methods retrive and set alias target. More... | |
const Constant * | getAliasee () const |
Constant * | getAliasee () |
GlobalValue * | getAliasedGlobal () |
const GlobalValue * | getAliasedGlobal () const |
GlobalValue * | resolveAliasedGlobal (bool stopOnWeak=true) |
const GlobalValue * | resolveAliasedGlobal (bool stopOnWeak=true) const |
![]() | |
~GlobalValue () | |
unsigned | getAlignment () const |
void | setAlignment (unsigned Align) |
bool | hasUnnamedAddr () const |
void | setUnnamedAddr (bool Val) |
VisibilityTypes | getVisibility () const |
bool | hasDefaultVisibility () const |
bool | hasHiddenVisibility () const |
bool | hasProtectedVisibility () const |
void | setVisibility (VisibilityTypes V) |
bool | hasSection () const |
const std::string & | getSection () const |
void | setSection (StringRef S) |
bool | use_empty_except_constants () |
Determine if the usage of this global value is empty except for transitively dead constants. More... | |
PointerType * | getType () const |
getType - Global values are always pointers. More... | |
bool | hasExternalLinkage () const |
bool | hasAvailableExternallyLinkage () const |
bool | hasLinkOnceLinkage () const |
bool | hasWeakLinkage () const |
bool | hasAppendingLinkage () const |
bool | hasInternalLinkage () const |
bool | hasPrivateLinkage () const |
bool | hasLinkerPrivateLinkage () const |
bool | hasLinkerPrivateWeakLinkage () const |
bool | hasLocalLinkage () const |
bool | hasDLLImportLinkage () const |
bool | hasDLLExportLinkage () const |
bool | hasExternalWeakLinkage () const |
bool | hasCommonLinkage () const |
void | setLinkage (LinkageTypes LT) |
LinkageTypes | getLinkage () const |
bool | isDiscardableIfUnused () const |
bool | mayBeOverridden () const |
bool | isWeakForLinker () const |
virtual void | copyAttributesFrom (const GlobalValue *Src) |
virtual void | destroyConstant () |
Override from Constant class. More... | |
bool | isDeclaration () const |
Module * | getParent () |
const Module * | getParent () const |
bool | isMaterializable () const |
bool | isDematerializable () const |
bool | Materialize (std::string *ErrInfo=0) |
void | Dematerialize () |
![]() | |
bool | isNullValue () const |
bool | isAllOnesValue () const |
bool | isNegativeZeroValue () const |
bool | isZeroValue () const |
Return true if the value is negative zero or null value. More... | |
bool | canTrap () const |
bool | isThreadDependent () const |
isThreadDependent - Return true if the value can vary between threads. More... | |
bool | isConstantUsed () const |
PossibleRelocationsTy | getRelocationInfo () const |
Constant * | getAggregateElement (unsigned Elt) const |
Constant * | getAggregateElement (Constant *Elt) const |
Constant * | getSplatValue () const |
const APInt & | getUniqueInteger () const |
virtual void | replaceUsesOfWithOnConstant (Value *, Value *, Use *) |
void | removeDeadConstantUsers () const |
![]() | |
~User () | |
void | operator delete (void *Usr) |
operator delete - free memory allocated for User and Use objects More... | |
void | operator delete (void *, unsigned) |
placement delete - required by std, but never called. More... | |
void | operator delete (void *, unsigned, bool) |
placement delete - required by std, but never called. More... | |
Value * | getOperand (unsigned i) const |
void | setOperand (unsigned i, Value *Val) |
const Use & | getOperandUse (unsigned i) const |
Use & | getOperandUse (unsigned i) |
unsigned | getNumOperands () const |
op_iterator | op_begin () |
const_op_iterator | op_begin () const |
op_iterator | op_end () |
const_op_iterator | op_end () const |
value_op_iterator | value_op_begin () |
value_op_iterator | value_op_end () |
void | dropAllReferences () |
void | replaceUsesOfWith (Value *From, Value *To) |
![]() | |
virtual | ~Value () |
void | dump () const |
dump - Support for debugging, callable in GDB: V->dump() More... | |
void | print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const |
Type * | getType () const |
LLVMContext & | getContext () const |
All values hold a context through their type. More... | |
bool | hasName () const |
ValueName * | getValueName () const |
void | setValueName (ValueName *VN) |
StringRef | getName () const |
void | setName (const Twine &Name) |
void | takeName (Value *V) |
void | replaceAllUsesWith (Value *V) |
bool | use_empty () const |
use_iterator | use_begin () |
const_use_iterator | use_begin () const |
use_iterator | use_end () |
const_use_iterator | use_end () const |
User * | use_back () |
const User * | use_back () const |
bool | hasOneUse () const |
bool | hasNUses (unsigned N) const |
bool | hasNUsesOrMore (unsigned N) const |
bool | isUsedInBasicBlock (const BasicBlock *BB) const |
unsigned | getNumUses () const |
void | addUse (Use &U) |
unsigned | getValueID () const |
unsigned | getRawSubclassOptionalData () const |
void | clearSubclassOptionalData () |
bool | hasSameSubclassOptionalData (const Value *V) const |
void | intersectOptionalDataWith (const Value *V) |
bool | hasValueHandle () const |
Value * | stripPointerCasts () |
Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCasts () const |
Value * | stripPointerCastsNoFollowAliases () |
Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCastsNoFollowAliases () const |
Value * | stripInBoundsConstantOffsets () |
Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsConstantOffsets () const |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More... | |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
Value * | stripInBoundsOffsets () |
Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsOffsets () const |
bool | isDereferenceablePointer () const |
Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
void | mutateType (Type *Ty) |
![]() | |
GlobalAlias * | getPrevNode () |
Get the previous node, or 0 for the list head. More... | |
const GlobalAlias * | getPrevNode () const |
Get the previous node, or 0 for the list head. More... | |
GlobalAlias * | getNextNode () |
Get the next node, or 0 for the list tail. More... | |
const GlobalAlias * | getNextNode () const |
Get the next node, or 0 for the list tail. More... | |
Friends | |
class | SymbolTableListTraits< GlobalAlias, Module > |
Definition at line 29 of file GlobalAlias.h.
GlobalAlias::GlobalAlias | ( | Type * | Ty, |
LinkageTypes | Linkage, | ||
const Twine & | Name = "" , |
||
Constant * | Aliasee = 0 , |
||
Module * | Parent = 0 |
||
) |
GlobalAlias ctor - If a parent module is specified, the alias is automatically inserted into the end of the specified module's alias list.
Definition at line 195 of file Globals.cpp.
References llvm::LeakDetector::addGarbageObject(), llvm::Module::getAliasList(), llvm::Value::getType(), and llvm::iplist< NodeTy, Traits >::push_back().
Definition at line 90 of file GlobalAlias.h.
References llvm::Value::getValueID(), and llvm::Value::GlobalAliasVal.
llvm::GlobalAlias::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Constant | ) |
Provide fast operand accessors.
|
virtual |
eraseFromParent - This method unlinks 'this' from the containing module and deletes it.
Implements llvm::GlobalValue.
Definition at line 221 of file Globals.cpp.
References llvm::iplist< NodeTy, Traits >::erase(), llvm::Module::getAliasList(), and llvm::GlobalValue::getParent().
GlobalValue * GlobalAlias::getAliasedGlobal | ( | ) |
getAliasedGlobal() - Aliasee can be either global or bitcast of global. This method retrives the global for both aliasee flavours.
Definition at line 232 of file Globals.cpp.
References llvm::CallingConv::C, getAliasee(), llvm::ConstantExpr::getOpcode(), and llvm::User::getOperand().
Referenced by getAliasedGlobal(), and resolveAliasedGlobal().
|
inline |
Definition at line 70 of file GlobalAlias.h.
References getAliasedGlobal().
|
inline |
Definition at line 61 of file GlobalAlias.h.
References llvm::User::getOperand().
Referenced by getAliasedGlobal(), hasUsesToReplace(), llvm::AssemblyWriter::printAlias(), and llvm::ObjectSizeOffsetVisitor::visitGlobalAlias().
|
inline |
Definition at line 64 of file GlobalAlias.h.
References llvm::User::getOperand().
|
inlinestatic |
Definition at line 84 of file GlobalAlias.h.
References llvm::GlobalValue::isExternalLinkage(), llvm::GlobalValue::isLinkOnceLinkage(), llvm::GlobalValue::isLocalLinkage(), and llvm::GlobalValue::isWeakLinkage().
|
inline |
Definition at line 38 of file GlobalAlias.h.
|
virtual |
removeFromParent - This method unlinks 'this' from the containing module, but does not delete it.
Implements llvm::GlobalValue.
Definition at line 217 of file Globals.cpp.
References llvm::Module::getAliasList(), llvm::GlobalValue::getParent(), and llvm::iplist< NodeTy, Traits >::remove().
GlobalValue * GlobalAlias::resolveAliasedGlobal | ( | bool | stopOnWeak = true | ) |
resolveAliasedGlobal() - This method tries to ultimately resolve the alias by going through the aliasing chain and trying to find the very last global. Returns NULL if a cycle was found. If stopOnWeak is false, then the whole chain aliasing chain is traversed, otherwise - only strong aliases.
Definition at line 247 of file Globals.cpp.
References getAliasedGlobal(), llvm::SmallPtrSet< PtrType, SmallSize >::insert(), and llvm::GlobalValue::mayBeOverridden().
Referenced by resolveAliasedGlobal().
|
inline |
Definition at line 80 of file GlobalAlias.h.
References resolveAliasedGlobal().
void GlobalAlias::setAliasee | ( | Constant * | GV | ) |
set/getAliasee - These methods retrive and set alias target.
Definition at line 225 of file Globals.cpp.
References llvm::GlobalValue::getType(), llvm::Value::getType(), and llvm::User::setOperand().
Referenced by llvm::CloneModule().
|
friend |
Definition at line 30 of file GlobalAlias.h.