[llvm-commits] CVS: llvm-gcc/gcc/c-common.c
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 13 19:22:17 PST 2005
Changes in directory llvm-gcc/gcc:
c-common.c updated: 1.6 -> 1.7
---
Log message:
Now that GCC can properly realize new things are constants (e.g. &Global[10]),
we can get rid of the gross hackery we have added in the past to handle
global initializers.
---
Diffs of the changes: (+1 -4)
c-common.c | 5 +----
1 files changed, 1 insertion(+), 4 deletions(-)
Index: llvm-gcc/gcc/c-common.c
diff -u llvm-gcc/gcc/c-common.c:1.6 llvm-gcc/gcc/c-common.c:1.7
--- llvm-gcc/gcc/c-common.c:1.6 Mon Jan 3 16:13:16 2005
+++ llvm-gcc/gcc/c-common.c Sun Feb 13 21:22:04 2005
@@ -44,8 +44,6 @@
#include "toplev.h"
#include "llvm-out.h"
-int parsing_initializer = 0;
-
cpp_reader *parse_in; /* Declared in c-pragma.h. */
/* We let tm.h override the types used here, to handle trivial differences
@@ -2563,8 +2561,7 @@
intop = convert (c_common_type_for_size (TYPE_PRECISION (sizetype),
TREE_UNSIGNED (sizetype)), intop);
- /* Don't create an ARRAY_REF if this is a potentially a static initializer. */
- if (EMIT_LLVM && !parsing_initializer) {
+ if (EMIT_LLVM) {
/* In LLVM we really want to represent this as &P[i], not as P+i*sizeof(*P)
*/
tree arrayref;
More information about the llvm-commits
mailing list