summaryrefslogtreecommitdiff
path: root/gcc/dwarfout.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-12 17:07:46 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-12 17:07:46 +0000
commit7e2bfe1e919308cba2a59c2d5229766df56e9f8a (patch)
tree8981c8afce67fc7c21c2b1606afc5f2108031f4f /gcc/dwarfout.c
parentf11893d303ff0c64bb95036d2600aff91c3cda93 (diff)
downloadgcc-7e2bfe1e919308cba2a59c2d5229766df56e9f8a.tar.gz
* except.c: Do not include "assert.h".
(save_eh_status): Turn asserts into conditional aborts. (restore_eh_status, scan_region): Likewise. * dwarfout.c: Do not include "assert.h". (bit_offset_attribute): Turn asserts into conditional aborts. (bit_size_attribute, output_inlined_enumeration_type_die): Likewise. (output_inlined_structure_type_die): Likewise. (output_inlined_union_type_die): Likewise (output_tagged_type_instantiation): Likewise. (dwarfout_file_scope_decl): Likewise. * dwarf2out.c: Do not include "assert.h" (expand_builtin_dwarf_reg_size): Turn asserts into conditional aborts. (reg_save, initial_return_save, dwarf2out_frame_debug): Likewise. (add_child_die, modified_type_die, add_bit_offset_attribute): Likewise. (add_bit_size_attribute, scope_die_for): Likewise. (output_pending_types_for_scope): Likewise. (get_inlined_enumeration_type_die): Likewise. (get_inlined_structure_type_die): Likewise. (get_inlined_union_type_die, gen_subprogram_die): Likewise. (gen_tagged_type_instantiation_die): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16442 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r--gcc/dwarfout.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index cdeed4abc60..2e108dc0410 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -33,9 +33,6 @@ Boston, MA 02111-1307, USA. */
#include "output.h"
#include "defaults.h"
-/* #define NDEBUG 1 */
-#include "assert.h"
-
#if defined(DWARF_TIMESTAMPS)
#if defined(POSIX)
#include <time.h>
@@ -2698,8 +2695,10 @@ bit_offset_attribute (decl)
register unsigned highest_order_field_bit_offset;
register unsigned bit_offset;
- assert (TREE_CODE (decl) == FIELD_DECL); /* Must be a field. */
- assert (type); /* Must be a bit field. */
+ /* Must be a bit field. */
+ if (!type
+ || TREE_CODE (decl) != FIELD_DECL)
+ abort ();
/* We can't yet handle bit-fields whose offsets are variable, so if we
encounter such things, just return without generating any attribute
@@ -2742,8 +2741,10 @@ static inline void
bit_size_attribute (decl)
register tree decl;
{
- assert (TREE_CODE (decl) == FIELD_DECL); /* Must be a field. */
- assert (DECL_BIT_FIELD_TYPE (decl)); /* Must be a bit field. */
+ /* Must be a field and a bit field. */
+ if (TREE_CODE (decl) != FIELD_DECL
+ || ! DECL_BIT_FIELD_TYPE (decl))
+ abort ();
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_bit_size);
ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
@@ -3272,7 +3273,8 @@ output_inlined_enumeration_type_die (arg)
ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_enumeration_type);
sibling_attribute ();
- assert (TREE_ASM_WRITTEN (type));
+ if (!TREE_ASM_WRITTEN (type))
+ abort ();
abstract_origin_attribute (type);
}
@@ -3286,7 +3288,8 @@ output_inlined_structure_type_die (arg)
ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_structure_type);
sibling_attribute ();
- assert (TREE_ASM_WRITTEN (type));
+ if (!TREE_ASM_WRITTEN (type))
+ abort ();
abstract_origin_attribute (type);
}
@@ -3300,7 +3303,8 @@ output_inlined_union_type_die (arg)
ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_union_type);
sibling_attribute ();
- assert (TREE_ASM_WRITTEN (type));
+ if (!TREE_ASM_WRITTEN (type))
+ abort ();
abstract_origin_attribute (type);
}
@@ -4436,9 +4440,11 @@ output_tagged_type_instantiation (type)
sure that we have the main variant (i.e. the unqualified version) of
this type now. */
- assert (type == type_main_variant (type));
+ if (type != type_main_variant (type))
+ abort ();
- assert (TREE_ASM_WRITTEN (type));
+ if (!TREE_ASM_WRITTEN (type))
+ abort ();
switch (TREE_CODE (type))
{
@@ -5179,7 +5185,8 @@ dwarfout_file_scope_decl (decl, set_finalizing)
/* The above call should have totally emptied the pending_types_list. */
- assert (pending_types == 0);
+ if (pending_types != 0)
+ abort ();
ASM_OUTPUT_POP_SECTION (asm_out_file);