llvm::emitMemChr

Emit a call to memchr with a pointer, int Val, and size_t Len.

Synopsis

Declared in <llvm/Transforms/Utils/BuildLibCalls.h>

Value*
emitMemChr(
    Value* Ptr,
    Value* Val,
    Value* Len,
    IRBuilderBase& B,
    DataLayout const& DL,
    TargetLibraryInfo const* TLI);

Description

This assumes that Ptr is a pointer, Val is an 'int' value, and Len is an 'size_t' value.

Return Value

The memchr call, or null if unavailable.

Parameters

NameDescription
PtrMemory region to search.
ValByte value to search for.
LenNumber of bytes to examine.
BIR builder used to create the call.
DLData layout used for size_t typing.
TLITarget library info describing available libcalls.