[PATCH] D27680: [CodeGen] Move lifetime.start of a variable when goto jumps back past its declaration

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 23 12:16:11 PST 2017


rjmccall added inline comments.


================
Comment at: lib/CodeGen/CodeGenFunction.h:217
+  /// statements.
+  llvm::SmallVector<bool, 4> LabelSeenStack;
+
----------------
Shouldn't this be maintained by some existing scoping structure like LexicalScope?


================
Comment at: lib/CodeGen/CodeGenFunction.h:236
+    LabelSeenStack.back() = true;
+  }
+
----------------
A label in a nested scope acts like a label in outer scopes, too.


https://reviews.llvm.org/D27680





More information about the cfe-commits mailing list