ΒΆbool isLegalToPromote(
    llvm::CallSite CS,
    llvm::Function* Callee,
    const char** FailureReason = nullptr)

Description

Return true if the given indirect call site can be made to call \p Callee. This function ensures that the number and type of the call site's arguments and return value match those of the given function. If the types do not match exactly, they must at least be bitcast compatible. If \p FailureReason is non-null and the indirect call cannot be promoted, the failure reason will be stored in it.

Declared at: llvm/include/llvm/Transforms/Utils/CallPromotionUtils.h:28

Parameters

llvm::CallSite CS
llvm::Function* Callee
const char** FailureReason = nullptr