Emit a call to strdup for the specified pointer.

Synopsis

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

Value*
emitStrDup(
    Value* Ptr,
    IRBuilderBase& B,
    TargetLibraryInfo const* TLI);

Description

Ptr is required to be some pointer type, and the return value has 'i8*' type.

Return Value

The strdup call, or null if unavailable.

Parameters

Name

Description

Ptr

Pointer to the C string to duplicate.

B

IR builder used to create the call.

TLI

Target library info describing available libcalls.

Created with MrDocs