LLVM  mainline
Public Member Functions | Static Public Member Functions | Friends
llvm::BlockAddress Class Reference

BlockAddress - The address of a basic block. More...

#include <Constants.h>

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

List of all members.

Public Member Functions

 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Transparently provide more efficient getOperand methods.
FunctiongetFunction () const
BasicBlockgetBasicBlock () const
void replaceUsesOfWithOnConstant (Value *From, Value *To, Use *U) override
 replaceUsesOfWithOnConstant - This method is a special form of User::replaceUsesOfWith (which does not work on constants) that does work on constants.

Static Public Member Functions

static BlockAddressget (Function *F, BasicBlock *BB)
 get - Return a BlockAddress for the specified function and basic block.
static BlockAddressget (BasicBlock *BB)
 get - Return a BlockAddress for the specified basic block.
static BlockAddresslookup (const BasicBlock *BB)
 Lookup an existing BlockAddress constant for the given BasicBlock.
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Friends

class Constant

Detailed Description

BlockAddress - The address of a basic block.

Definition at line 800 of file Constants.h.


Member Function Documentation

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

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented from llvm::Constant.

Definition at line 831 of file Constants.h.

References llvm::Value::getValueID().

Transparently provide more efficient getOperand methods.

BlockAddress * BlockAddress::get ( Function F,
BasicBlock BB 
) [static]

get - Return a BlockAddress for the specified basic block.

The basic block must be embedded into a function.

Definition at line 1491 of file Constants.cpp.

References llvm::BasicBlock::getParent().

Definition at line 825 of file Constants.h.

Referenced by get(), and replaceUsesOfWithOnConstant().

void BlockAddress::replaceUsesOfWithOnConstant ( Value ,
Value ,
Use  
) [override, virtual]

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 from llvm::Constant.

Definition at line 1534 of file Constants.cpp.

References llvm::LLVMContextImpl::BlockAddresses, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), getBasicBlock(), llvm::Value::getContext(), getFunction(), llvm::LLVMContext::pImpl, llvm::Constant::replaceUsesOfWithOnConstantImpl(), llvm::User::setOperand(), and llvm::Value::stripPointerCasts().


Friends And Related Function Documentation

friend class Constant [friend]

Definition at line 805 of file Constants.h.


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