make_path_absolute(const char*p);
extern const char* PRIVATE_TYPES_SUPPR_SPEC_NAME;
-
}// end namespace tools_utils
+
+/// A macro that expands to aborting the program when executed.
+///
+/// Before aborting, the macro emits informatin about the source
+/// location where it was expanded.
+#define ABG_ASSERT_NOT_REACHED \
+ do { \
+ std::cerr << "in " << __FUNCTION__ \
+ << " at: " << __FILE__ << ":" << __LINE__ \
+ << ": execution should not have reached this point!\n"; \
+ abort(); \
+ } while (false)
}//end namespace abigail
default:
// An unknown value that probably ought to be supported? Let's
// abort right here rather than yielding garbage.
- abort();
+ ABG_ASSERT_NOT_REACHED;
}
return t;
b = elf_symbol::GNU_UNIQUE_BINDING;
break;
default:
- abort();
+ ABG_ASSERT_NOT_REACHED;
}
return b;
result = 8;
break;
default:
- abort();
+ ABG_ASSERT_NOT_REACHED;
}
return result;
break;
case DW_TAG_subrange_type:
/* we shouldn't get here as this part is handled by build_array_type */
- abort();
- break;
+ ABG_ASSERT_NOT_REACHED;
case DW_TAG_thrown_type:
break;
case DW_TAG_interface_type:
case DW_TAG_compile_unit:
// We shouldn't reach this point b/c this should be handled by
// build_translation_unit.
- abort();
- break;
+ ABG_ASSERT_NOT_REACHED;
case DW_TAG_namespace:
case DW_TAG_module:
case DW_TAG_formal_parameter:
// We should not read this case as it should have been dealt
// with by build_function_decl above.
- abort();
- break;
+ ABG_ASSERT_NOT_REACHED;
case DW_TAG_constant:
break;
// For now, the DIEs under these are read lazily when they are
// referenced by a public decl DIE that is under a
// DW_TAG_compile_unit, so we shouldn't get here.
- abort();
+ ABG_ASSERT_NOT_REACHED;
// Other declaration we don't really intend to support yet.
case DW_TAG_dwarf_procedure: