Skip to content

Commit

Permalink
Keep empty ifs when wanted
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Apr 13, 2023
1 parent eb64242 commit 87eb50c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frontc/cabs2cil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5164,7 +5164,7 @@ and doCondition (isconst: bool) (* If we are in constants, we do our best to
(e: A.expression)
(st: chunk)
(sf: chunk) : chunk =
if isEmpty st && isEmpty sf then
if (!Cil.removeBranchingOnConstants || isconst) && isEmpty st && isEmpty sf then
let se,_,_ = doExp isconst e ADrop in se
else
compileCondExp isconst (doCondExp isconst e) st sf
Expand Down

0 comments on commit 87eb50c

Please sign in to comment.