Index: src/IceDefs.h |
diff --git a/src/IceDefs.h b/src/IceDefs.h |
index 991e47f100957f7804a2f63aacc0c00d97fcc16b..66a500fe950f46a312caa41b1a8d84b4fe2dad36 100644 |
--- a/src/IceDefs.h |
+++ b/src/IceDefs.h |
@@ -38,6 +38,15 @@ |
#include "llvm/Support/ELF.h" |
#include "llvm/Support/raw_ostream.h" |
+// TODO(stichnot): Define ICE_ATTRIBUTE_TLS as thread_local after all |
+// compilers support that C++11 keyword. In particular, MacOS 10.6 |
+// does not support it. |
+#if defined (_MSC_VER) |
+#define ICE_ATTRIBUTE_TLS __declspec(thread) |
+#else // !_MSC_VER |
+#define ICE_ATTRIBUTE_TLS __thread |
+#endif // !_MSC_VER |
+ |
namespace Ice { |
class Assembler; |