Skip to content
Commit fa58b26a authored by Edwin Vane's avatar Edwin Vane
Browse files

Stop LoopConvert removing DeclStmts from selection/iteration condition clauses

If the LoopConvert Transform detects an alias for the loop variable, it
attempts to use that name in the resulting range-based for loop while removing
the original DeclStmt for the variable. That removal produced bad code when the
declaration was in the condition of an if, switch, while, or for stmt. This
revision fixes the problem by simply replacing the declaration with a use of
the alias variable.

llvm-svn: 181242
parent 0b7c611f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment