-
-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move compiler-specific definitions to Compiler.inl.
- Loading branch information
nitrocaster
committed
Jan 17, 2016
1 parent
5a49463
commit 82fe59f
Showing
2 changed files
with
28 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
#if !defined(__GNUC__) && !defined(_MSC_VER) | ||
#error Unsupported compiler | ||
#endif | ||
|
||
#if defined(__GNUC__) | ||
#define XR_EXPORT __attribute__ ((visibility("default"))) | ||
#define XR_IMPORT __attribute__ ((visibility("default"))) | ||
#elif defined(_MSC_VER) | ||
#define XR_EXPORT __declspec(dllexport) | ||
#define XR_IMPORT __declspec(dllimport) | ||
#endif | ||
|
||
#if defined(__GNUC__) | ||
#define NO_INLINE __attribute__((noinline)) | ||
#define FORCE_INLINE __attribute__((always_inline)) inline | ||
#define ALIGN(a) __attribute__((aligned(a))) | ||
#elif defined(_MSC_VER) | ||
#define NO_INLINE __declspec(noinline) | ||
#define FORCE_INLINE __forceinline | ||
#define ALIGN(a) __declspec(align(a)) | ||
#define __thread __declspec(thread) | ||
#endif | ||
|
||
// XXX: remove | ||
#define _inline inline | ||
#define __inline inline | ||
|
||
// XXX: remove IC/ICF/ICN | ||
#define IC inline | ||
#define ICF FORCE_INLINE | ||
#define ICN NO_INLINE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters