Skip to content

Commit

Permalink
LBE pass fix -> do not skip procedures without error locations
Browse files Browse the repository at this point in the history
  • Loading branch information
csanadtelbisz committed Oct 20, 2023
1 parent 0319f72 commit ff9a9ef
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class LbePass(val parseContext: ParseContext) : ProcedurePass {
*
*/
override fun run(builder: XcfaProcedureBuilder): XcfaProcedureBuilder {
if (level == LbeLevel.NO_LBE || builder.errorLoc.isEmpty) return builder
if (level == LbeLevel.NO_LBE) return builder

if (level == LbeLevel.LBE_SEQ || level == LbeLevel.LBE_FULL && parseContext.multiThreading) {
level = LbeLevel.LBE_LOCAL
Expand All @@ -107,7 +107,9 @@ class LbePass(val parseContext: ParseContext) : ProcedurePass {
this.builder = builder

// Step 0
builder.errorLoc.get().outgoingEdges.forEach(builder::removeEdge)
if (builder.errorLoc.isPresent) {
builder.errorLoc.get().outgoingEdges.forEach(builder::removeEdge)
}

// Step 1
if (level == LbeLevel.LBE_LOCAL) {
Expand Down

0 comments on commit ff9a9ef

Please sign in to comment.