class PoisonValue

Declaration

class PoisonValue : public UndefValue { /* full declaration omitted */ };

Description

In order to facilitate speculative execution, many instructions do not invoke immediate undefined behavior when provided with illegal operands, and return a poison value instead. see LangRef.html#poisonvalues for details.

Declared at: llvm/include/llvm/IR/Constants.h:1412

Inherits from: UndefValue

Member Variables

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasMetadata
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 32
public static MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

Inherited from UndefValue:

Inherited from ConstantData:

Inherited from Constant:

Inherited from User:

Inherited from Value:

Methods

PoisonValue(llvm::Type* T)

Declared at: llvm/include/llvm/IR/Constants.h:1415

Parameters

llvm::Type* T

PoisonValue(const llvm::PoisonValue&)

Declared at: llvm/include/llvm/IR/Constants.h:1420

Parameters

const llvm::PoisonValue&

static bool classof(const llvm::Value* V)

Description

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

Declared at: llvm/include/llvm/IR/Constants.h:1441

Parameters

const llvm::Value* V

void destroyConstantImpl()

Declared at: llvm/include/llvm/IR/Constants.h:1417

static llvm::PoisonValue* get(llvm::Type* T)

Description

Static factory methods - Return an 'poison' object of the specified type.

Declared at: llvm/include/llvm/IR/Constants.h:1423

Parameters

llvm::Type* T

llvm::PoisonValue* getElementValue(
    llvm::Constant* C) const

Description

Return an poison of the right value for the specified GEP index if we can, otherwise return null (e.g. if C is a ConstantExpr).

Declared at: llvm/include/llvm/IR/Constants.h:1435

Parameters

llvm::Constant* C

llvm::PoisonValue* getElementValue(
    unsigned int Idx) const

Description

Return an poison of the right value for the specified GEP index.

Declared at: llvm/include/llvm/IR/Constants.h:1438

Parameters

unsigned int Idx

llvm::PoisonValue* getSequentialElement() const

Description

If this poison has array or vector type, return a poison with the right element type.

Declared at: llvm/include/llvm/IR/Constants.h:1427

llvm::PoisonValue* getStructElement(
    unsigned int Elt) const

Description

If this poison has struct type, return a poison with the right element type for the specified element.

Declared at: llvm/include/llvm/IR/Constants.h:1431

Parameters

unsigned int Elt