summaryrefslogtreecommitdiff
path: root/gcc/c-lang.c
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-02-12 11:35:04 -0800
committerYamaArashi <shadow962@live.com>2016-02-12 11:35:04 -0800
commitfb95ff91be532f3b63786339ea3cb28694aef172 (patch)
tree1e024434b3ab7fbb48b874344c6dc7e082fb83f7 /gcc/c-lang.c
parent166e94b61c7150981753e2ad54f1d55149e5f0c7 (diff)
remove static constuctors/destructors
Diffstat (limited to 'gcc/c-lang.c')
-rwxr-xr-xgcc/c-lang.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/gcc/c-lang.c b/gcc/c-lang.c
index ed2b9e4..89c371f 100755
--- a/gcc/c-lang.c
+++ b/gcc/c-lang.c
@@ -160,54 +160,4 @@ build_objc_string (len, str)
void
finish_file ()
{
-#ifndef ASM_OUTPUT_CONSTRUCTOR
- extern tree static_ctors;
-#endif
-#ifndef ASM_OUTPUT_DESTRUCTOR
- extern tree static_dtors;
-#endif
- extern tree build_function_call PROTO((tree, tree));
-#if !defined(ASM_OUTPUT_CONSTRUCTOR) || !defined(ASM_OUTPUT_DESTRUCTOR)
- tree void_list_node = build_tree_list (NULL_TREE, void_type_node);
-#endif
-#ifndef ASM_OUTPUT_CONSTRUCTOR
- if (static_ctors)
- {
- tree fnname = get_file_function_name ('I');
- start_function (void_list_node,
- build_parse_node (CALL_EXPR, fnname, void_list_node,
- NULL_TREE),
- NULL_TREE, NULL_TREE, 0);
- fnname = DECL_ASSEMBLER_NAME (current_function_decl);
- store_parm_decls ();
-
- for (; static_ctors; static_ctors = TREE_CHAIN (static_ctors))
- expand_expr_stmt (build_function_call (TREE_VALUE (static_ctors),
- NULL_TREE));
-
- finish_function (0);
-
- assemble_constructor (IDENTIFIER_POINTER (fnname));
- }
-#endif
-#ifndef ASM_OUTPUT_DESTRUCTOR
- if (static_dtors)
- {
- tree fnname = get_file_function_name ('D');
- start_function (void_list_node,
- build_parse_node (CALL_EXPR, fnname, void_list_node,
- NULL_TREE),
- NULL_TREE, NULL_TREE, 0);
- fnname = DECL_ASSEMBLER_NAME (current_function_decl);
- store_parm_decls ();
-
- for (; static_dtors; static_dtors = TREE_CHAIN (static_dtors))
- expand_expr_stmt (build_function_call (TREE_VALUE (static_dtors),
- NULL_TREE));
-
- finish_function (0);
-
- assemble_destructor (IDENTIFIER_POINTER (fnname));
- }
-#endif
}