CreatePtrDiff overloads

Synopses

Declared in <llvm/IR/IRBuilder.h>

Return the difference between two pointer values, dividing out the size of the pointed‐to objects. The returned value type is the address type of the pointers.

Value*
CreatePtrDiff(
    Type* ElemTy,
    Value* LHS,
    Value* RHS,
    Twine const& Name = "");

Return the difference between two pointer values. The returned value type is the address type of the pointers.

Value*
CreatePtrDiff(
    Value* LHS,
    Value* RHS,
    Twine const& Name = "",
    bool IsNUW = false);

Return Value

  • The difference between two pointer values, dividing out the size of the pointed‐to objects.

  • The difference between two pointer values.

Parameters

Name

Description

ElemTy

Pointed‐to element type.

LHS

Left‐hand side operand.

RHS

Right‐hand side operand.

Name

Name of the new instruction or value.

IsNUW

Whether the pointer difference is nuw.

Created with MrDocs