aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2006-04-28 20:52:01 +0000
committerEric Christopher <echristo@gcc.gnu.org>2006-04-28 20:52:01 +0000
commit4f8bdef92960bb0cf1268f57e4560834eb775882 (patch)
tree0e065145d4fc18d16bffa4723df2c37825f1f762
parenta5f844647be0134e5a3e0a16572308f0de57c15d (diff)
downloadgcc-4f8bdef92960bb0cf1268f57e4560834eb775882.zip
gcc-4f8bdef92960bb0cf1268f57e4560834eb775882.tar.gz
gcc-4f8bdef92960bb0cf1268f57e4560834eb775882.tar.bz2
darwin-c.c (darwin_ms_struct): Move this
2006-04-28 Eric Christopher <echristo@apple.com> * config/darwin-c.c (darwin_ms_struct): Move this (darwin_set_default_type_attributes): and this... * config/darwin.c: ... here. * config/darwin.h (darwin_ms_struct): Declare. From-SVN: r113358
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/darwin-c.c14
-rw-r--r--gcc/config/darwin.c22
-rw-r--r--gcc/config/darwin.h3
4 files changed, 28 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 23faf82..8eca71b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2006-04-28 Eric Christopher <echristo@apple.com>
+
+ * config/darwin-c.c (darwin_ms_struct): Move this
+ (darwin_set_default_type_attributes): and this...
+ * config/darwin.c: ... here.
+ * config/darwin.h (darwin_ms_struct): Declare.
+
2006-04-28 Andrew MacLeod <amacleod@redhat.com>
* tree-ssa-dom.c (propagate_rhs_into_lhs): Fix assert clause.
diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c
index 6f263f4..5317153 100644
--- a/gcc/config/darwin-c.c
+++ b/gcc/config/darwin-c.c
@@ -41,9 +41,6 @@ Boston, MA 02110-1301, USA. */
static bool using_frameworks = false;
-/* True if we're setting __attribute__ ((ms_struct)). */
-static bool darwin_ms_struct = false;
-
/* Maintain a small stack of alignments. This is similar to pragma
pack's stack, but simpler. */
@@ -184,17 +181,6 @@ darwin_pragma_ms_struct (cpp_reader *pfile ATTRIBUTE_UNUSED)
warning (OPT_Wpragmas, "junk at end of '#pragma ms_struct'");
}
-/* Set the darwin specific attributes on TYPE. */
-void
-darwin_set_default_type_attributes (tree type)
-{
- if (darwin_ms_struct
- && TREE_CODE (type) == RECORD_TYPE)
- TYPE_ATTRIBUTES (type) = tree_cons (get_identifier ("ms_struct"),
- NULL_TREE,
- TYPE_ATTRIBUTES (type));
-}
-
static struct {
size_t len;
const char *name;
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 4db4cc6..5ffe744 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -79,6 +79,9 @@ Boston, MA 02110-1301, USA. */
/* Section names. */
section * darwin_sections[NUM_DARWIN_SECTIONS];
+/* True if we're setting __attribute__ ((ms_struct)). */
+int darwin_ms_struct = false;
+
/* A get_unnamed_section callback used to switch to an ObjC section.
DIRECTIVE is as for output_section_asm_op. */
@@ -1448,7 +1451,7 @@ darwin_file_start (void)
{
if (write_symbols == DWARF2_DEBUG)
{
- static const char * const debugnames[] =
+ static const char * const debugnames[] =
{
DEBUG_FRAME_SECTION,
DEBUG_INFO_SECTION,
@@ -1468,10 +1471,10 @@ darwin_file_start (void)
int namelen;
switch_to_section (get_section (debugnames[i], SECTION_DEBUG, NULL));
-
+
gcc_assert (strncmp (debugnames[i], "__DWARF,", 8) == 0);
gcc_assert (strchr (debugnames[i] + 8, ','));
-
+
namelen = strchr (debugnames[i] + 8, ',') - (debugnames[i] + 8);
fprintf (asm_out_file, "Lsection%.*s:\n", namelen, debugnames[i] + 8);
}
@@ -1489,7 +1492,7 @@ darwin_asm_output_dwarf_offset (FILE *file, int size, const char * lab,
{
char sname[64];
int namelen;
-
+
gcc_assert (base->common.flags & SECTION_NAMED);
gcc_assert (strncmp (base->named.name, "__DWARF,", 8) == 0);
gcc_assert (strchr (base->named.name + 8, ','));
@@ -1534,4 +1537,15 @@ darwin_asm_output_anchor (rtx symbol)
SYMBOL_REF_BLOCK_OFFSET (symbol));
}
+/* Set the darwin specific attributes on TYPE. */
+void
+darwin_set_default_type_attributes (tree type)
+{
+ if (darwin_ms_struct
+ && TREE_CODE (type) == RECORD_TYPE)
+ TYPE_ATTRIBUTES (type) = tree_cons (get_identifier ("ms_struct"),
+ NULL_TREE,
+ TYPE_ATTRIBUTES (type));
+}
+
#include "gt-darwin.h"
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index c73ff60..dcfab42 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -80,6 +80,9 @@ Boston, MA 02110-1301, USA. */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0
+/* True if pragma ms_struct is in effect. */
+extern GTY(()) int darwin_ms_struct;
+
/* This table intercepts weirdo options whose names would interfere
with normal driver conventions, and either translates them into
standardly-named options, or adds a 'Z' so that they can get to