Skip to content

Commit

Permalink
LBE pass fix
Browse files Browse the repository at this point in the history
Procedures without error locations are not skipped by LBE now
  • Loading branch information
csanadtelbisz authored Oct 20, 2023
1 parent 0319f72 commit f904031
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 f904031

Please sign in to comment.