summaryrefslogtreecommitdiff
path: root/gcc/dwarfout.c
diff options
context:
space:
mode:
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);