Promote the given indirect call site to unconditionally call Callee.

Synopsis

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

CallBase&
promoteCall(
    CallBase& CB,
    Function* Callee,
    CastInst** RetBitCast = nullptr);

Description

This function promotes the given call site, returning the direct call or invoke instruction. If the function type of the call site doesn't match that of the callee, bitcast instructions are inserted where appropriate. If RetBitCast is non‐null, it will be used to store the return value bitcast, if created.

Return Value

The promoted direct call or invoke instruction.

Parameters

Name

Description

CB

Indirect call site to promote.

Callee

Function to call directly after promotion.

RetBitCast

Optional out‐parameter for a created return‐value bitcast.

Created with MrDocs