diff options
Diffstat (limited to 'dwarflint/misc.hh')
| -rw-r--r-- | dwarflint/misc.hh | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/dwarflint/misc.hh b/dwarflint/misc.hh index 79b60147..fac9526d 100644 --- a/dwarflint/misc.hh +++ b/dwarflint/misc.hh @@ -34,19 +34,19 @@ extern "C" #include "../lib/system.h" } -#define REALLOC(A, BUF) \ - do { \ - typeof ((A)) _a = (A); \ - if (_a->size == _a->alloc) \ - { \ - if (_a->alloc == 0) \ - _a->alloc = 8; \ - else \ - _a->alloc *= 2; \ - _a->BUF = (typeof (_a->BUF)) \ - xrealloc (_a->BUF, \ - sizeof (*_a->BUF) * _a->alloc); \ - } \ +#define REALLOC(A, BUF) \ + do { \ + typeof ((A)) _a = (A); \ + if (_a->size == _a->alloc) \ + { \ + if (_a->alloc == 0) \ + _a->alloc = 8; \ + else \ + _a->alloc *= 2; \ + _a->BUF = (typeof (_a->BUF)) \ + xrealloc (_a->BUF, \ + sizeof (*_a->BUF) * _a->alloc); \ + } \ } while (0) #define WIPE(OBJ) memset (&OBJ, 0, sizeof (OBJ)) @@ -58,5 +58,7 @@ bool necessary_alignment (uint64_t start, uint64_t length, bool supported_version (unsigned version, size_t num_supported, struct where *where, ...); +#define UNREACHABLE assert (!"unreachable") + #endif//DWARFLINT_MISC_HH |
