Skip to content

Commit

Permalink
LLVM Pass - Remove assert on blocks without predecessors
Browse files Browse the repository at this point in the history
This is possible in C++ code, just unreachable.  Apparently the
compiler did not consider the block dead and left it.  #216
  • Loading branch information
bprail committed Aug 23, 2019
1 parent 2de91e8 commit b2cfe50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm-contech/BufferCheckAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ namespace llvm
if (pred_bb_states.size() == 0 &&
bb_val != entry_val)
{
errs() << "BBCHK " << *bb << "\n";
assert(pred_bb_states.size() > 0);
// Some C++ code generates unreachable blocks.
continue;
}

// get the initial current state
Expand Down

0 comments on commit b2cfe50

Please sign in to comment.