Skip to content

Commit

Permalink
SVF code formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
yuleisui committed Oct 10, 2024
1 parent f9929a7 commit e815bb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion svf-llvm/include/SVF-LLVM/LLVMModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ class LLVMModuleSet

ObjTypeInference* getTypeInference();

inline ICFG* getICFG() {
inline ICFG* getICFG()
{
return icfg;
}

Expand Down
14 changes: 7 additions & 7 deletions svf-llvm/lib/ICFGBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,16 @@ InterICFGNode* ICFGBuilder::addInterBlockICFGNode(const Instruction* inst)
else
{
calledFunc = SVFUtil::dyn_cast<SVFFunction>(
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);

Expand Down Expand Up @@ -337,7 +337,7 @@ inline ICFGNode* ICFGBuilder::addBlockICFGNode(const Instruction* inst)
node = addIntraBlockICFGNode(inst);
const_cast<SVFBasicBlock*>(
llvmModuleSet()->getSVFBasicBlock(inst->getParent()))
->addICFGNode(node);
->addICFGNode(node);
return node;
}

Expand All @@ -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<ReturnInst>(inst));
llvmModuleSet()->getSVFBasicBlock(inst->getParent()), SVFUtil::isa<ReturnInst>(inst));
instToBlockNodeMap()[inst] = sNode;
llvmModuleSet()->setValueAttr(inst, sNode);
return sNode;
Expand Down

0 comments on commit e815bb5

Please sign in to comment.