diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2012-07-05 16:18:28 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2012-07-05 16:18:28 +0000 |
commit | b78caa645f70eff2f037f1f8bb43ca9129dbd8d9 (patch) | |
tree | 9ab7e8e70f1aa53d28850091c17185fd52ebf0e7 /lib/sanitizer_common/sanitizer_common.h | |
parent | decaec9ee3177b5e81e358ad8e93ab70b38a1cc0 (diff) | |
download | compiler-rt-b78caa645f70eff2f037f1f8bb43ca9129dbd8d9.tar.gz |
tsan: Go language support
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159754 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sanitizer_common/sanitizer_common.h b/lib/sanitizer_common/sanitizer_common.h index 380fe8c75..a6a40cb16 100644 --- a/lib/sanitizer_common/sanitizer_common.h +++ b/lib/sanitizer_common/sanitizer_common.h @@ -83,10 +83,10 @@ int Atexit(void (*function)(void)); void SortArray(uptr *array, uptr size); // Math -inline bool IsPowerOfTwo(uptr x) { +INLINE bool IsPowerOfTwo(uptr x) { return (x & (x - 1)) == 0; } -inline uptr RoundUpTo(uptr size, uptr boundary) { +INLINE uptr RoundUpTo(uptr size, uptr boundary) { CHECK(IsPowerOfTwo(boundary)); return (size + boundary - 1) & ~(boundary - 1); } @@ -95,14 +95,14 @@ template<class T> T Min(T a, T b) { return a < b ? a : b; } template<class T> T Max(T a, T b) { return a > b ? a : b; } // Char handling -inline bool IsSpace(int c) { +INLINE bool IsSpace(int c) { return (c == ' ') || (c == '\n') || (c == '\t') || (c == '\f') || (c == '\r') || (c == '\v'); } -inline bool IsDigit(int c) { +INLINE bool IsDigit(int c) { return (c >= '0') && (c <= '9'); } -inline int ToLower(int c) { +INLINE int ToLower(int c) { return (c >= 'A' && c <= 'Z') ? (c + 'a' - 'A') : c; } |