bh_assert.c 555 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #include "bh_assert.h"
  6. void
  7. bh_assert_internal(int64 v, const char *file_name, int line_number,
  8. const char *expr_string)
  9. {
  10. if (v)
  11. return;
  12. if (!file_name)
  13. file_name = "NULL FILENAME";
  14. if (!expr_string)
  15. expr_string = "NULL EXPR_STRING";
  16. os_printf("\nASSERTION FAILED: %s, at file %s, line %d\n", expr_string,
  17. file_name, line_number);
  18. abort();
  19. }