Skip to content

Commit 80c478f

Browse files
authored
Merge pull request #1766 from FXTi/master
Fix(#1765): Use thunk function as placeholder when it can't be resolved
2 parents 43fc7ce + 36953c3 commit 80c478f

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)