Skip to content

Commit 36953c3

Browse files
committed
fix: use thunk function as placeholder when it can't be resolved
1 parent 43fc7ce commit 36953c3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

svf-llvm/lib/CHGBuilder.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -739,12 +739,10 @@ void CHGBuilder::addFuncToFuncVector(CHNode::FuncVector &v, const Function *lf)
739739
{
740740
if (cppUtil::isCPPThunkFunction(lf))
741741
{
742-
if (const auto* tf = cppUtil::getThunkTarget(lf))
743-
{
744-
const FunObjVar* pFunction =
745-
llvmModuleSet()->getFunObjVar(tf);
746-
v.push_back(pFunction);
747-
}
742+
const auto* tf = cppUtil::getThunkTarget(lf);
743+
const FunObjVar* pFunction =
744+
llvmModuleSet()->getFunObjVar(tf ? tf : lf);
745+
v.push_back(pFunction);
748746
}
749747
else
750748
{

0 commit comments

Comments
 (0)