[llvm-branch-commits] [llvm-gcc-branch] r118841 - in /llvm-gcc-4.2/branches/Apple/Morbo: ./ gcc/c-typeck.c
Stuart Hastings
stuart at apple.com
Thu Nov 11 13:24:04 PST 2010
Author: stuart
Date: Thu Nov 11 15:24:04 2010
New Revision: 118841
URL: http://llvm.org/viewvc/llvm-project?rev=118841&view=rev
Log:
Merge r118749 into Morbo. Radar 8521187.
Modified:
llvm-gcc-4.2/branches/Apple/Morbo/ (props changed)
llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c
Propchange: llvm-gcc-4.2/branches/Apple/Morbo/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 11 15:24:04 2010
@@ -1,2 +1,2 @@
/llvm/trunk:100565
-/llvm-gcc-4.2/trunk:98728,98841,98893,99196,99262,99305,99412,99592-99593,99629,99670,99982,99984-99986,99988,99992-99993,99995,99997-99999,100035,100149,100303,100565,100624-100626,100712,100721,101090-101091,101199,101216,101304,101333,101614,101804,101959,102139,102148,102433,102444,102506-102507,102511,102532,102561,102589,102636,102648,102745,103361,103366-103367,103394,103414,103644,103800,103918,104181,104384,104420,104423,104523,104726,105504,105828-105829,105902,105948-105949,106005,106243-106244,106270,106352,106564,106611-106612,106681,106690,106711,107062,107439,107843,108784-108786,109556-109557,109702,110043,110250,110405,110459,110501,110689,110727,113248,114961
+/llvm-gcc-4.2/trunk:98728,98841,98893,99196,99262,99305,99412,99592-99593,99629,99670,99982,99984-99986,99988,99992-99993,99995,99997-99999,100035,100149,100303,100565,100624-100626,100712,100721,101090-101091,101199,101216,101304,101333,101614,101804,101959,102139,102148,102433,102444,102506-102507,102511,102532,102561,102589,102636,102648,102745,103361,103366-103367,103394,103414,103644,103800,103918,104181,104384,104420,104423,104523,104726,105504,105828-105829,105902,105948-105949,106005,106243-106244,106270,106352,106564,106611-106612,106681,106690,106711,107062,107439,107843,108784-108786,109556-109557,109702,110043,110250,110405,110459,110501,110689,110727,113248,114961,118749
Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c?rev=118841&r1=118840&r2=118841&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/c-typeck.c Thu Nov 11 15:24:04 2010
@@ -4967,7 +4967,27 @@
warning (OPT_Wtraditional, "traditional C rejects automatic "
"aggregate initialization");
- DECL_INITIAL (decl) = value;
+ /* LLVM LOCAL begin 8521187 */
+ {
+ bool was_error_mark = (DECL_INITIAL(decl) == error_mark_node);
+ extern void * TheTreeToLLVM; /* llvm-internal.h is not available here. Ugh. */
+
+ DECL_INITIAL (decl) = value;
+
+ /*
+ * If we're updating the initialization of a variable or function decl,
+ * and we're inside a function body (not initializing a global or static),
+ * and the previous value was the placeholder 'error_mark_node',
+ * then tell LLVM we updated the initialization.
+ */
+ if ((TREE_CODE(decl) == VAR_DECL || TREE_CODE(decl) == FUNCTION_DECL)
+ && TREE_STATIC(decl) && was_error_mark && TheTreeToLLVM)
+ {
+ extern void reset_type_and_initializer_llvm(tree);
+ reset_type_and_initializer_llvm(decl);
+ }
+ }
+ /* LLVM LOCAL end 8521187 */
/* ANSI wants warnings about out-of-range constant initializers. */
STRIP_TYPE_NOPS (value);
More information about the llvm-branch-commits
mailing list