LLVM API Documentation

Public Member Functions | Static Public Member Functions | Friends
llvm::GlobalAlias Class Reference

#include <GlobalAlias.h>

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

List of all members.

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.
virtual void removeFromParent ()
virtual void eraseFromParent ()
void setAliasee (Constant *GV)
 set/getAliasee - These methods retrive and set alias target.
const ConstantgetAliasee () const
ConstantgetAliasee ()
const GlobalValuegetAliasedGlobal () const
const GlobalValueresolveAliasedGlobal (bool stopOnWeak=true) const

Static Public Member Functions

static bool classof (const Value *V)

Friends

class SymbolTableListTraits< GlobalAlias, Module >

Detailed Description

Definition at line 29 of file GlobalAlias.h.


Constructor & Destructor Documentation

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(), and llvm::Value::getType().


Member Function Documentation

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

Reimplemented from llvm::GlobalValue.

Definition at line 79 of file GlobalAlias.h.

References llvm::Value::getValueID(), and llvm::Value::GlobalAliasVal.

llvm::GlobalAlias::DECLARE_TRANSPARENT_OPERAND_ACCESSORS ( Constant  )

Provide fast operand accessors.

void GlobalAlias::eraseFromParent ( ) [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::Module::getAliasList(), and llvm::GlobalValue::getParent().

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 232 of file Globals.cpp.

References llvm::CallingConv::C, getAliasee(), llvm::ConstantExpr::getOpcode(), and llvm::User::getOperand().

Referenced by resolveAliasedGlobal().

const Constant* llvm::GlobalAlias::getAliasee ( ) const [inline]
Constant* llvm::GlobalAlias::getAliasee ( ) [inline]

Definition at line 64 of file GlobalAlias.h.

References llvm::User::getOperand().

void* llvm::GlobalAlias::operator new ( size_t  s) [inline]

Reimplemented from llvm::User.

Definition at line 38 of file GlobalAlias.h.

void GlobalAlias::removeFromParent ( ) [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(), and llvm::GlobalValue::getParent().

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 247 of file Globals.cpp.

References getAliasedGlobal(), llvm::SmallPtrSet< PtrType, SmallSize >::insert(), and llvm::GlobalValue::mayBeOverridden().

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().


Friends And Related Function Documentation

friend class SymbolTableListTraits< GlobalAlias, Module > [friend]

Definition at line 30 of file GlobalAlias.h.


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