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

This class represents a cast from a pointer to an integer. More...

#include <Instructions.h>

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

List of all members.

Public Member Functions

 PtrToIntInst (Value *S, Type *Ty, const Twine &NameStr="", Instruction *InsertBefore=nullptr)
 Constructor with insert-before-instruction semantics.
 PtrToIntInst (Value *S, Type *Ty, const Twine &NameStr, BasicBlock *InsertAtEnd)
 Constructor with insert-at-end-of-block semantics.
ValuegetPointerOperand ()
 Gets the pointer operand.
const ValuegetPointerOperand () const
 Gets the pointer operand.
unsigned getPointerAddressSpace () const
 Returns the address space of the pointer operand.

Static Public Member Functions

static unsigned getPointerOperandIndex ()
 Gets the operand index of the pointer operand.
static bool classof (const Instruction *I)
 Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Protected Member Functions

PtrToIntInstcloneImpl () const
 Clone an identical PtrToIntInst.

Friends

class Instruction

Detailed Description

This class represents a cast from a pointer to an integer.

Definition at line 4703 of file Instructions.h.


Constructor & Destructor Documentation

PtrToIntInst::PtrToIntInst ( Value S,
Type Ty,
const Twine NameStr = "",
Instruction InsertBefore = nullptr 
)

Constructor with insert-before-instruction semantics.

Parameters:
SThe value to be converted
TyThe type to convert to
NameStrA name for the new instruction
InsertBeforeWhere to insert the new instruction

Definition at line 3230 of file Instructions.cpp.

References llvm::CastInst::castIsValid(), and llvm::CastInst::getOpcode().

Referenced by cloneImpl().

PtrToIntInst::PtrToIntInst ( Value S,
Type Ty,
const Twine NameStr,
BasicBlock InsertAtEnd 
)

Constructor with insert-at-end-of-block semantics.

Parameters:
SThe value to be converted
TyThe type to convert to
NameStrA name for the new instruction
InsertAtEndThe block to insert the instruction into

Definition at line 3236 of file Instructions.cpp.

References llvm::CastInst::castIsValid(), and llvm::CastInst::getOpcode().


Member Function Documentation

static bool llvm::PtrToIntInst::classof ( const Instruction I) [inline, static]

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

Reimplemented from llvm::CastInst.

Definition at line 4740 of file Instructions.h.

References llvm::Instruction::getOpcode().

Referenced by classof().

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

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

Reimplemented from llvm::CastInst.

Definition at line 4743 of file Instructions.h.

References classof().

PtrToIntInst * PtrToIntInst::cloneImpl ( ) const [protected]

Clone an identical PtrToIntInst.

Reimplemented from llvm::Instruction.

Definition at line 3886 of file Instructions.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and PtrToIntInst().

Returns the address space of the pointer operand.

Definition at line 4735 of file Instructions.h.

References llvm::Type::getPointerAddressSpace(), getPointerOperand(), and llvm::Value::getType().

Referenced by llvm::InstCombiner::visitPtrToInt().

Gets the pointer operand.

Definition at line 4728 of file Instructions.h.

References llvm::User::getOperand().

Referenced by getPointerAddressSpace().

Gets the pointer operand.

Definition at line 4730 of file Instructions.h.

References llvm::User::getOperand().

Gets the operand index of the pointer operand.

Definition at line 4732 of file Instructions.h.


Friends And Related Function Documentation

friend class Instruction [friend]

Definition at line 4706 of file Instructions.h.


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