MCPcopy Create free account
hub / github.com/SVF-tools/SVF / isStackAllocExtCallViaRet

Method isStackAllocExtCallViaRet

svf-llvm/lib/LLVMUtil.cpp:667–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667bool LLVMUtil::isStackAllocExtCallViaRet(const Instruction *inst)
668{
669 LLVMModuleSet* pSet = LLVMModuleSet::getLLVMModuleSet();
670 bool isPtrTy = inst->getType()->isPointerTy();
671 if (const CallBase* call = SVFUtil::dyn_cast<CallBase>(inst))
672 {
673 const Function* fun = call->getCalledFunction();
674 return fun && isPtrTy &&
675 pSet->is_alloc_stack_ret(fun);
676 }
677 else
678 return false;
679}
680
681/**
682 * Check if a given value represents a heap object.

Callers

nothing calls this directly

Calls 4

isPointerTyMethod · 0.80
getCalledFunctionMethod · 0.80
getTypeMethod · 0.45
is_alloc_stack_retMethod · 0.45

Tested by

no test coverage detected