File tree Expand file tree Collapse file tree
lib/PhasarLLVM/ControlFlow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,19 +116,18 @@ LLVMBasedBackwardsICFG::getPredsOf(const llvm::Instruction *Stmt) const {
116116 }
117117 auto ExitPoints =
118118 LLVMBasedBackwardCFG::getExitPointsOf (BackwardRetIt->second );
119- std::vector<const llvm::Instruction *> Result (ExitPoints.begin (),
120- ExitPoints.end ());
121- return Result;
119+ return {ExitPoints.begin (), ExitPoints.end ()};
122120}
123121
124122std::vector<const llvm::Instruction *>
125123LLVMBasedBackwardsICFG::getSuccsOf (const llvm::Instruction *Stmt) const {
126- if (Stmt-> getParent () == nullptr && BackwardRetToFunction. count ( Stmt) > 0 ) {
124+ if (isExitInst ( Stmt)) {
127125 return {};
128126 }
129127 std::vector<const llvm::Instruction *> Succs =
130128 LLVMBasedBackwardCFG::getSuccsOf (Stmt);
131129 if (Succs.size () == 0 ) {
130+ assert (Stmt->getParent ()->getParent () && " Could not find parent of stmt's parent " );
132131 Succs.push_back (
133132 BackwardRets.at (Stmt->getParent ()->getParent ()).getInstance ());
134133 }
You can’t perform that action at this time.
0 commit comments