Return true if this function has non‐call uses that take its address.
Synopsis
Declared in <llvm/IR/Function.h>
bool
hasAddressTaken(
User const** PutOffender = nullptr,
bool IgnoreCallbackUses = false,
bool IgnoreAssumeLikeCalls = true,
bool IngoreLLVMUsed = false,
bool IgnoreARCAttachedCall = false,
bool IgnoreCastedDirectCall = false) const;
Description
Returns true if there are any uses other than direct calls or invokes to it, or blockaddress expressions. Optionally passes back an offending user for diagnostic purposes. Optionally ignores callback uses, assume‐like pointer annotation calls, references in llvm.used and llvm.compiler.used variables, operand bundle "clang.arc.attachedcall", and direct calls with a different call site signature (the function is implicitly casted).
Return Value
True if this function's address is taken by a non‐call use.
Parameters
Name |
Description |
PutOffender |
Optional out‐parameter for an offending user, or null. |
IgnoreCallbackUses |
If true, ignore callback uses. |
IgnoreAssumeLikeCalls |
If true, ignore assume‐like annotation calls. |
IngoreLLVMUsed |
If true, ignore llvm.used / llvm.compiler.used refs. |
IgnoreARCAttachedCall |
If true, ignore clang.arc.attachedcall uses. |
IgnoreCastedDirectCall |
If true, ignore casted direct calls. |
Created with MrDocs