ADT
        arm-eh
        ast-experimental
        enum
        forall-pointer-decay
        jacob/cs343-translation
        new-ast
        new-ast-unique-expr
        pthread-emulation
        qualifiedEnum
      
      
        
          | Last change
 on this file since 95cb63b was             50aeb6f, checked in by Thierry Delisle <tdelisle@…>, 6 years ago | 
        
          | 
Small tweaks to the memory layout
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            546 bytes | 
      
      
| Line |  | 
|---|
| 1 | #pragma once | 
|---|
| 2 |  | 
|---|
| 3 | #ifndef NDEBUG | 
|---|
| 4 | #include <cassert> | 
|---|
| 5 | #include <cstdlib> | 
|---|
| 6 |  | 
|---|
| 7 | #define sstr(s) #s | 
|---|
| 8 | #define xstr(s) sstr(s) | 
|---|
| 9 |  | 
|---|
| 10 | extern const char * __my_progname; | 
|---|
| 11 |  | 
|---|
| 12 | #define assertf(cond, ...) ({             \ | 
|---|
| 13 | if(!(cond)) {                       \ | 
|---|
| 14 | fprintf(stderr, "%s: " __FILE__ ":" xstr(__LINE__) ": %s: Assertion '" xstr(cond) "' failed.\n", __my_progname, __PRETTY_FUNCTION__); \ | 
|---|
| 15 | fprintf(stderr, __VA_ARGS__); \ | 
|---|
| 16 | fprintf(stderr, "\n"); \ | 
|---|
| 17 | std::abort();                 \ | 
|---|
| 18 | }                                   \ | 
|---|
| 19 | }) | 
|---|
| 20 | #else | 
|---|
| 21 | #define assertf(cond, ...) | 
|---|
| 22 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.