aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/darwin.c
diff options
context:
space:
mode:
authorIain Sandoe <iains@gcc.gnu.org>2010-07-10 00:22:35 +0000
committerIain Sandoe <iains@gcc.gnu.org>2010-07-10 00:22:35 +0000
commit058bfe530068df2d3ccc4131a1837b44a83acba4 (patch)
tree4629b5a86dbf043bfa8fdd1c7e561c7fc9ec54be /gcc/config/darwin.c
parent0571e6db633e48c91a7c241cbf807810afeae2d6 (diff)
downloadgcc-058bfe530068df2d3ccc4131a1837b44a83acba4.zip
gcc-058bfe530068df2d3ccc4131a1837b44a83acba4.tar.gz
gcc-058bfe530068df2d3ccc4131a1837b44a83acba4.tar.bz2
make ObjC do LTO.
gcc/ PR objc/44140 * config/darwin.c (output_objc_section_asm_op): Save and restore section when outputting ObjC section list. testsuite/ PR objc/44140 * objc.dg/lto/trivial-1_0.m: New. * objc.dg/lto/lto.exp: New. * obj-c++.dg/lto/trivial-1_0.mm: New. * obj-c++.dg/lto/lto.exp: New. * objc.dg/symtab-1.m: Adjust sizes. * objc.dg/image-info.m: Do not run for gnu-runtime. gcc/objc/ PR objc/44140 * objc-act.c: build_objc_string_decl() remove declaration. (finish_var_decl): Remove forcing of var output and marking as "Used". (init_def_list): Use integer_zero_node. (init_objc_symtab): Use integer_zero_node, make the short integer type specific on relevant nodes. (generate_objc_symtab_decl): Remove call to forward_declare_categories(). Use null_pointer_node where appropriate. (build_module_descriptor): Comment and mark this item as DECL_PRESERVE_P. (generate_static_references): Use gcc_unreachable instead of abort (). (diagnose_missing_method): New. (build_next_selector_translation_table): New. (build_gnu_selector_translation_table): New. (add_objc_string): Merge code from build_objc_string_decl... ... and delete build_objc_string_decl(). (generate_dispatch_table): Make integer types explicit. (generate_category): Pass implent and arrange for the data to be extracted within the routine. Do not start new vars, but finish the ones collcted during parsing. (generate_shared_structures): Likewise. (finish_objc): Reorder code so that we finish variables before referencing them. Save the global data before calling meta-data creation routines, and pass the current reference to the two main routines. Only call generate_objc_image_info () for the NeXT runtime. (generate_classref_translation_entry): Comment on and make this item DECL_PRESERVE_P. (handle_class_ref): Use varpool interfaces, comment on and make this item DECL_PRESERVE_P. (handle_impent): Likewise. (generate_objc_image_info): Only generate when the content is non-zero. Make integer types explict. From-SVN: r162030
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r--gcc/config/darwin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 876b433..952539f 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -99,6 +99,7 @@ output_objc_section_asm_op (const void *directive)
section is requested. */
if (! been_here)
{
+ section *saved_in_section = in_section;
static const enum darwin_section_enum tomark[] =
{
/* written, cold -> hot */
@@ -129,6 +130,7 @@ output_objc_section_asm_op (const void *directive)
been_here = true;
for (i = 0; i < ARRAY_SIZE (tomark); i++)
switch_to_section (darwin_sections[tomark[i]]);
+ switch_to_section (saved_in_section);
}
output_section_asm_op (directive);
}