Commit 57e0aad3 authored by Tom Stellard's avatar Tom Stellard
Browse files

Merging r281797:

------------------------------------------------------------------------
r281797 | richard-llvm | 2016-09-16 16:30:39 -0700 (Fri, 16 Sep 2016) | 10 lines

Fix a couple of wrong-code bugs in switch-on-constant optimization:

 * recurse through intermediate LabelStmts and AttributedStmts when checking
   whether a statement inside a switch declares a variable
 * if the end of a compound statement is reachable from the chosen case label,
   and the compound statement contains a variable declaration, it's not valid
   to just emit the contents of the compound statement -- we must emit the
   statement itself or we lose the scope (and thus end lifetimes at the wrong
   point)

------------------------------------------------------------------------

llvm-svn: 287790
parent 78e1ea3c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment