Changeset 90152a4 for libcfa/src/assert.cfa
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b7c89aa
- Parents:
- f9feab8 (diff), 305581d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/assert.cfa
rf9feab8 r90152a4 17 17 #include <stdarg.h> // varargs 18 18 #include <stdio.h> // fprintf 19 #include "bits/debug.h "19 #include "bits/debug.hfa" 20 20 21 21 extern "C" { 22 22 extern const char * __progname; // global name of running executable (argv[0]) 23 23 24 #define CFA_ASSERT_FMT "Cforall Assertion error from program \"%s\" in \"%s\" at line %d in file \"%s\""24 #define CFA_ASSERT_FMT "Cforall Assertion error \"%s\" from program \"%s\" in \"%s\" at line %d in file \"%s\"" 25 25 26 26 // called by macro assert in assert.h 27 27 void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) { 28 __cfaabi_dbg_bits_print_safe( CFA_ASSERT_FMT ".\n", __progname, function, line, file );28 __cfaabi_dbg_bits_print_safe( CFA_ASSERT_FMT ".\n", assertion, __progname, function, line, file ); 29 29 abort(); 30 30 } … … 33 33 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) { 34 34 __cfaabi_dbg_bits_acquire(); 35 __cfaabi_dbg_bits_print_nolock( CFA_ASSERT_FMT ": ", __progname, function, line, file );35 __cfaabi_dbg_bits_print_nolock( CFA_ASSERT_FMT ": ", assertion, __progname, function, line, file ); 36 36 37 37 va_list args;
Note:
See TracChangeset
for help on using the changeset viewer.