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=nullptr, Module *Parent=nullptr)
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Constant)
 Provide fast operand accessors.
void removeFromParent () override
void eraseFromParent () override
void setAliasee (Constant *GV)
 set/getAliasee - These methods retrive and set alias target.
const ConstantgetAliasee () const
ConstantgetAliasee ()
GlobalValuegetAliasedGlobal ()
const GlobalValuegetAliasedGlobal () const

Static Public Member Functions

static bool isValidLinkage (LinkageTypes L)
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 = nullptr,
Module Parent = nullptr 
)

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

References llvm::LeakDetector::addGarbageObject(), llvm::Module::getAliasList(), llvm::Value::getType(), and llvm::iplist< NodeTy, Traits >::push_back().


Member Function Documentation

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

Reimplemented from llvm::GlobalValue.

Definition at line 82 of file GlobalAlias.h.

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

Provide fast operand accessors.

void GlobalAlias::eraseFromParent ( ) [override, virtual]

eraseFromParent - This method unlinks 'this' from the containing module and deletes it.

Implements llvm::GlobalValue.

Definition at line 228 of file Globals.cpp.

References llvm::iplist< NodeTy, Traits >::erase(), llvm::Module::getAliasList(), and llvm::GlobalValue::getParent().

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.

Definition at line 255 of file Globals.cpp.

References llvm::dyn_cast(), getAliaseeGV(), and llvm::SmallPtrSetImpl< PtrType >::insert().

Referenced by getAliasedGlobal().

Definition at line 72 of file GlobalAlias.h.

References getAliasedGlobal().

Definition at line 64 of file GlobalAlias.h.

References llvm::User::getOperand().

static bool llvm::GlobalAlias::isValidLinkage ( LinkageTypes  L) [inline, static]
void* llvm::GlobalAlias::operator new ( size_t  s) [inline]

Reimplemented from llvm::User.

Definition at line 38 of file GlobalAlias.h.

void GlobalAlias::removeFromParent ( ) [override, virtual]

removeFromParent - This method unlinks 'this' from the containing module, but does not delete it.

Implements llvm::GlobalValue.

Definition at line 224 of file Globals.cpp.

References llvm::Module::getAliasList(), llvm::GlobalValue::getParent(), and llvm::iplist< NodeTy, Traits >::remove().

set/getAliasee - These methods retrive and set alias target.

Definition at line 232 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: