diff --git a/include/profiler/profiler.h b/include/profiler/profiler.h index 135ad91..1cd489f 100644 --- a/include/profiler/profiler.h +++ b/include/profiler/profiler.h @@ -26,13 +26,21 @@ along with this program.If not, see . # define EASY_THREAD_LOCAL __declspec(thread) # endif #elif defined(__GNUC__) +#ifndef __clang__ # if (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || (__GNUC__ < 4) // There is no support for C++11 thread_local keyword prior to gcc 4.8. Use __thread instead. # define EASY_THREAD_LOCAL __thread +#endif # endif +#if defined ( __clang__ ) +# if (__clang_major__ == 3 && __clang_minor__ < 3) || (__clang_major__ < 3) +# define EASY_THREAD_LOCAL __thread +#endif #endif -// TODO: Check thread_local support for Clang! +#endif + +// TODO: Check thread local support for clanv earlier than 3.3 #ifndef EASY_THREAD_LOCAL # define EASY_THREAD_LOCAL thread_local