ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
Last change
on this file since bcb14b5 was bf71cfd, checked in by Thierry Delisle <tdelisle@…>, 7 years ago |
Moved up many directories in source
|
-
Property mode
set to
100644
|
File size:
473 bytes
|
Line | |
---|
1 | #pragma once
|
---|
2 |
|
---|
3 | #ifdef NDEBUG
|
---|
4 |
|
---|
5 | #define check(x)
|
---|
6 |
|
---|
7 | #define checkf(x, format, ...)
|
---|
8 |
|
---|
9 | #warning no debug checks
|
---|
10 |
|
---|
11 | #else
|
---|
12 |
|
---|
13 | #include <stdlib.h>
|
---|
14 | #include <stdio.h>
|
---|
15 |
|
---|
16 | #define check(x) do {\
|
---|
17 | if(!(x)) {\
|
---|
18 | printf("CHECK failed : %s at %s:%i\n", #x, __FILE__, __LINE__);\
|
---|
19 | abort();\
|
---|
20 | }}while( (int)0 )\
|
---|
21 |
|
---|
22 | #define checkf(x, ...) do {\
|
---|
23 | if(!(x)) {\
|
---|
24 | printf("CHECK failed : %s at %s:%i\n", #x, __FILE__, __LINE__);\
|
---|
25 | printf(__VA_ARGS__);\
|
---|
26 | abort();\
|
---|
27 | }}while( (int)0 )\
|
---|
28 |
|
---|
29 | #endif //NO_CHECKS
|
---|
Note:
See
TracBrowser
for help on using the repository browser.