[llvm-commits] [llvm-gcc-4.2] r93394 - /llvm-gcc-4.2/trunk/gcc/tree-cfg.c
Stuart Hastings
stuart at apple.com
Wed Jan 13 16:54:44 PST 2010
Author: stuart
Date: Wed Jan 13 18:54:44 2010
New Revision: 93394
URL: http://llvm.org/viewvc/llvm-project?rev=93394&view=rev
Log:
Decorate computed-GOTO variable assignment with lexical block.
Modified:
llvm-gcc-4.2/trunk/gcc/tree-cfg.c
Modified: llvm-gcc-4.2/trunk/gcc/tree-cfg.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-cfg.c?rev=93394&r1=93393&r2=93394&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-cfg.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-cfg.c Wed Jan 13 18:54:44 2010
@@ -316,6 +316,19 @@
/* Copy the original computed goto's destination into VAR. */
assignment = build2 (MODIFY_EXPR, ptr_type_node,
var, GOTO_DESTINATION (last));
+ /* LLVM LOCAL begin 7387470 */
+ if (TREE_CODE_CLASS(TREE_CODE(GOTO_DESTINATION(last))) ==
+ tcc_declaration)
+ {
+ extern tree debug_find_var_in_block_tree (tree, tree);
+ tree block =
+ debug_find_var_in_block_tree(GOTO_DESTINATION(last),
+ DECL_INITIAL(current_function_decl));
+ /* This could be a compiler-created temporary variable
+ where block == NULL_TREE. That's O.K. */
+ TREE_BLOCK(assignment) = block;
+ }
+ /* LLVM LOCAL end 7387470 */
bsi_insert_before (&bsi, assignment, BSI_SAME_STMT);
/* And re-vector the computed goto to the new destination. */
More information about the llvm-commits
mailing list