LLVM API Documentation
#include <GlobalAlias.h>


Public Member Functions | |
| void * | operator new (size_t s) |
| GlobalAlias (const Type *Ty, LinkageTypes Linkage, const std::string &Name="", Constant *Aliasee=0, Module *Parent=0) | |
| DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
| Provide fast operand accessors. | |
| virtual bool | isDeclaration () const |
| virtual void | removeFromParent () |
| virtual void | eraseFromParent () |
| void | setAliasee (Constant *GV) |
| set/getAliasee - These methods retrive and set alias target. | |
| const Constant * | getAliasee () const |
| Constant * | getAliasee () |
| const GlobalValue * | getAliasedGlobal () const |
| const GlobalValue * | resolveAliasedGlobal (bool stopOnWeak=true) const |
Static Public Member Functions | |
| static bool | classof (const GlobalAlias *) |
| static bool | classof (const Value *V) |
Friends | |
| class | SymbolTableListTraits< GlobalAlias, Module > |
Definition at line 29 of file GlobalAlias.h.
| GlobalAlias::GlobalAlias | ( | const Type * | Ty, | |
| LinkageTypes | Linkage, | |||
| const std::string & | 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 186 of file Globals.cpp.
References llvm::LeakDetector::addGarbageObject(), llvm::Module::getAliasList(), and llvm::Value::getType().
| void* llvm::GlobalAlias::operator new | ( | size_t | s | ) | [inline] |
| llvm::GlobalAlias::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
Provide fast operand accessors.
| bool GlobalAlias::isDeclaration | ( | ) | const [virtual] |
isDeclaration - Is this global variable lacking an initializer? If so, the global variable is defined in some other translation unit, and is thus only a declaration here.
Implements llvm::GlobalValue.
Definition at line 216 of file Globals.cpp.
References getAliasedGlobal(), and llvm::GlobalValue::isDeclaration().
| void GlobalAlias::removeFromParent | ( | ) | [virtual] |
removeFromParent - This method unlinks 'this' from the containing module, but does not delete it.
Implements llvm::GlobalValue.
Definition at line 208 of file Globals.cpp.
References llvm::Module::getAliasList(), and llvm::GlobalValue::getParent().
| void GlobalAlias::eraseFromParent | ( | ) | [virtual] |
eraseFromParent - This method unlinks 'this' from the containing module and deletes it.
Implements llvm::GlobalValue.
Definition at line 212 of file Globals.cpp.
References llvm::Module::getAliasList(), and llvm::GlobalValue::getParent().
| void GlobalAlias::setAliasee | ( | Constant * | GV | ) |
set/getAliasee - These methods retrive and set alias target.
Definition at line 224 of file Globals.cpp.
References llvm::GlobalValue::getType(), llvm::Value::getType(), and llvm::Constant::setOperand().
Referenced by llvm::CloneModule(), and fold().
| const Constant* llvm::GlobalAlias::getAliasee | ( | ) | const [inline] |
Definition at line 66 of file GlobalAlias.h.
References llvm::Constant::getOperand().
Referenced by getAliasedGlobal().
| Constant* llvm::GlobalAlias::getAliasee | ( | ) | [inline] |
| const GlobalValue * GlobalAlias::getAliasedGlobal | ( | ) | const |
getAliasedGlobal() - Aliasee can be either global or bitcast of global. This method retrives the global for both aliasee flavours.
Definition at line 233 of file Globals.cpp.
References BitCast, llvm::CallingConv::C, llvm::dyn_cast(), getAliasee(), llvm::ConstantExpr::getOpcode(), llvm::Constant::getOperand(), and GV.
Referenced by isDeclaration(), LinkAlias(), and resolveAliasedGlobal().
| const GlobalValue * GlobalAlias::resolveAliasedGlobal | ( | bool | stopOnWeak = true |
) | const |
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 251 of file Globals.cpp.
References getAliasedGlobal(), GV, llvm::GlobalValue::hasWeakLinkage(), llvm::SmallPtrSet< PtrType, SmallSize >::insert(), and Visited.
| static bool llvm::GlobalAlias::classof | ( | const GlobalAlias * | ) | [inline, static] |
Definition at line 84 of file GlobalAlias.h.
| static bool llvm::GlobalAlias::classof | ( | const Value * | V | ) | [inline, static] |
Reimplemented from llvm::GlobalValue.
Definition at line 85 of file GlobalAlias.h.
References llvm::Value::getValueID(), and llvm::Value::GlobalAliasVal.
friend class SymbolTableListTraits< GlobalAlias, Module > [friend] |
Definition at line 30 of file GlobalAlias.h.
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.