diff --git a/svf-llvm/include/SVF-LLVM/LLVMModule.h b/svf-llvm/include/SVF-LLVM/LLVMModule.h index de3899784..3d9bf0f52 100644 --- a/svf-llvm/include/SVF-LLVM/LLVMModule.h +++ b/svf-llvm/include/SVF-LLVM/LLVMModule.h @@ -363,7 +363,8 @@ class LLVMModuleSet ObjTypeInference* getTypeInference(); - inline ICFG* getICFG() { + inline ICFG* getICFG() + { return icfg; } diff --git a/svf-llvm/lib/ICFGBuilder.cpp b/svf-llvm/lib/ICFGBuilder.cpp index 7ac7d9614..726ddd06c 100644 --- a/svf-llvm/lib/ICFGBuilder.cpp +++ b/svf-llvm/lib/ICFGBuilder.cpp @@ -250,16 +250,16 @@ InterICFGNode* ICFGBuilder::addInterBlockICFGNode(const Instruction* inst) else { calledFunc = SVFUtil::dyn_cast( - llvmModuleSet()->getSVFValue(called_llvmval)); + llvmModuleSet()->getSVFValue(called_llvmval)); } SVFBasicBlock* bb = llvmModuleSet()->getSVFBasicBlock(inst->getParent()); CallICFGNode* callICFGNode = icfg->addCallICFGNode( - bb, llvmModuleSet()->getSVFType(inst->getType()), - calledFunc, cb->getFunctionType()->isVarArg(), isvcall, - isvcall ? cppUtil::getVCallIdx(cb) : 0, - isvcall ? cppUtil::getFunNameOfVCallSite(cb) : ""); + bb, llvmModuleSet()->getSVFType(inst->getType()), + calledFunc, cb->getFunctionType()->isVarArg(), isvcall, + isvcall ? cppUtil::getVCallIdx(cb) : 0, + isvcall ? cppUtil::getFunNameOfVCallSite(cb) : ""); csToCallNodeMap()[inst] = callICFGNode; llvmModuleSet()->setValueAttr(inst, callICFGNode); @@ -337,7 +337,7 @@ inline ICFGNode* ICFGBuilder::addBlockICFGNode(const Instruction* inst) node = addIntraBlockICFGNode(inst); const_cast( llvmModuleSet()->getSVFBasicBlock(inst->getParent())) - ->addICFGNode(node); + ->addICFGNode(node); return node; } @@ -346,7 +346,7 @@ IntraICFGNode* ICFGBuilder::addIntraBlockICFGNode(const Instruction* inst) IntraICFGNode* node = llvmModuleSet()->getIntraBlock(inst); assert (node==nullptr && "no IntraICFGNode for this instruction?"); IntraICFGNode* sNode = icfg->addIntraICFGNode( - llvmModuleSet()->getSVFBasicBlock(inst->getParent()), SVFUtil::isa(inst)); + llvmModuleSet()->getSVFBasicBlock(inst->getParent()), SVFUtil::isa(inst)); instToBlockNodeMap()[inst] = sNode; llvmModuleSet()->setValueAttr(inst, sNode); return sNode;