diff options
author | Irmen de Jong <irmen@razorvine.net> | 2019-10-21 22:00:10 +0200 |
---|---|---|
committer | Alon Zakai <azakai@google.com> | 2019-10-21 13:00:10 -0700 |
commit | 87d12c2dc788e49f82e3bc91b825a40b8d1c2efc (patch) | |
tree | 3bd91fb4bce2dc8119fc8445b63c40538bd6c028 /src | |
parent | d2550891e41ad0215b1cae46fa711bc1e264166a (diff) | |
download | binaryen-87d12c2dc788e49f82e3bc91b825a40b8d1c2efc.tar.gz binaryen-87d12c2dc788e49f82e3bc91b825a40b8d1c2efc.tar.bz2 binaryen-87d12c2dc788e49f82e3bc91b825a40b8d1c2efc.zip |
Move WASM_DEPRECATED so that binaryen-c.h is selfcontained. Fixes #2054 (#2399)
Diffstat (limited to 'src')
-rw-r--r-- | src/binaryen-c.h | 8 | ||||
-rw-r--r-- | src/compiler-support.h | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/binaryen-c.h b/src/binaryen-c.h index ae0a06835..1015c65de 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -47,7 +47,13 @@ #include <stddef.h> #include <stdint.h> -#include "compiler-support.h" +#ifdef __GNUC__ +#define WASM_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) +#define WASM_DEPRECATED __declspec(deprecated) +#else +#define WASM_DEPRECATED +#endif #if defined(_MSC_VER) && !defined(BUILD_STATIC_LIBRARY) #define BINARYEN_API __declspec(dllexport) diff --git a/src/compiler-support.h b/src/compiler-support.h index 911d92ef5..c75676d54 100644 --- a/src/compiler-support.h +++ b/src/compiler-support.h @@ -50,13 +50,10 @@ #ifdef __GNUC__ #define WASM_NORETURN __attribute__((noreturn)) -#define WASM_DEPRECATED __attribute__((deprecated)) #elif defined(_MSC_VER) #define WASM_NORETURN __declspec(noreturn) -#define WASM_DEPRECATED __declspec(deprecated) #else #define WASM_NORETURN -#define WASM_DEPRECATED #endif // The code might contain TODOs or stubs that read some values but do nothing |