[llvm-commits] [llvm-gcc-4.2] r63165 - in /llvm-gcc-4.2/trunk/gcc: c-parser.c cp/parser.c tree-nested.c
Dale Johannesen
dalej at apple.com
Tue Jan 27 17:32:44 PST 2009
Author: johannes
Date: Tue Jan 27 19:32:44 2009
New Revision: 63165
URL: http://llvm.org/viewvc/llvm-project?rev=63165&view=rev
Log:
Fix block-in_structors.C a different way; put back
Duncan's favorite assert.
Modified:
llvm-gcc-4.2/trunk/gcc/c-parser.c
llvm-gcc-4.2/trunk/gcc/cp/parser.c
llvm-gcc-4.2/trunk/gcc/tree-nested.c
Modified: llvm-gcc-4.2/trunk/gcc/c-parser.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-parser.c?rev=63165&r1=63164&r2=63165&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-parser.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-parser.c Tue Jan 27 19:32:44 2009
@@ -10201,6 +10201,8 @@
block_helper_function_decl = build_helper_func_decl (build_block_helper_name (0),
ftype);
DECL_CONTEXT (block_helper_function_decl) = current_function_decl;
+ /* LLVM LOCAL 6530487 - blocks helper functions never need a static chain */
+ DECL_NO_STATIC_CHAIN (block_helper_function_decl) = 1;
cur_block->helper_func_decl = block_helper_function_decl;
push_function_context ();
Modified: llvm-gcc-4.2/trunk/gcc/cp/parser.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/parser.c?rev=63165&r1=63164&r2=63165&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/parser.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/parser.c Tue Jan 27 19:32:44 2009
@@ -21461,6 +21461,8 @@
block_helper_function_decl = build_helper_func_decl (build_block_helper_name (unique_count),
ftype);
DECL_CONTEXT (block_helper_function_decl) = current_function_decl;
+ /* LLVM LOCAL 6530487 - blocks helper functions never need a static chain */
+ DECL_NO_STATIC_CHAIN (block_helper_function_decl) = 1;
cur_block->helper_func_decl = block_helper_function_decl;
DECL_ARGUMENTS (block_helper_function_decl) = arglist;
Modified: llvm-gcc-4.2/trunk/gcc/tree-nested.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-nested.c?rev=63165&r1=63164&r2=63165&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-nested.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-nested.c Tue Jan 27 19:32:44 2009
@@ -1971,11 +1971,20 @@
walk_function (convert_tramp_reference, root);
walk_function (convert_call_expr, root);
+ /* LLVM LOCAL begin */
+ /* FIXME: Keep the LLVM-way? */
+#ifdef ENABLE_LLVM
+ gcc_assert (!root->outer ||
+ DECL_NO_STATIC_CHAIN (root->context) ==
+ !(root->chain_decl || root->chain_field));
+#else
/* If the function does not use a static chain, then remember that. */
if (root->outer && !root->chain_decl && !root->chain_field)
DECL_NO_STATIC_CHAIN (root->context) = 1;
else
gcc_assert (!DECL_NO_STATIC_CHAIN (root->context));
+#endif
+ /* LLVM LOCAL end */
root = root->next;
}
More information about the llvm-commits
mailing list