Changeset b3c36f4 for src/Common/Assert.cc
- Timestamp:
- Jun 5, 2017, 11:43:18 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 7e003011
- Parents:
- fa21ac9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/Assert.cc
rfa21ac9 rb3c36f4 21 21 extern const char * __progname; // global name of running executable (argv[0]) 22 22 23 #define CFA_ASSERT_FMT "*CFA assertion error* from program \"%s\" in \"%s\" at line %d in file \"%s\""23 #define CFA_ASSERT_FMT "*CFA assertion error* \"%s\" from program \"%s\" in \"%s\" at line %d in file \"%s\"" 24 24 25 25 // called by macro assert in assert.h 26 26 void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) { 27 fprintf( stderr, CFA_ASSERT_FMT ".\n", __progname, function, line, file );27 fprintf( stderr, CFA_ASSERT_FMT ".\n", assertion, __progname, function, line, file ); 28 28 abort(); 29 29 } … … 31 31 // called by macro assertf 32 32 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) { 33 fprintf( stderr, CFA_ASSERT_FMT ": ", __progname, function, line, file );33 fprintf( stderr, CFA_ASSERT_FMT ": ", assertion, __progname, function, line, file ); 34 34 va_list args; 35 35 va_start( args, fmt );
Note: See TracChangeset
for help on using the changeset viewer.