source: src/examples/gc_no_raii/tools/checks.h @ 15db1ab

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 15db1ab was 15db1ab, checked in by Thierry Delisle <tdelisle@…>, 8 years ago

added some files for the garbage collector and hack together the compilation

  • Property mode set to 100644
File size: 430 bytes
Line 
1#pragma once
2
3#if _DEBUG
4
5#include <stdlib.h>
6#include <stdio.h>
7
8#define check(x) do {\
9        if(!(x)) {\
10                printf("CHECK failed : %s at %s:%i\n", #x, __FILE__, __LINE__);\
11                abort();\
12        }}while(0)\
13
14#define checkf(x, ...) do {\
15        if(!(x)) {\
16                printf("CHECK failed : %s at %s:%i\n", #x, __FILE__, __LINE__);\
17                printf(__VA_ARGS__);\
18                abort();\
19        }}while(0)\
20
21#else
22
23#define check(x)
24
25#define checkf(x, format, ...)
26
27#endif //NO_CHECKS
Note: See TracBrowser for help on using the repository browser.