Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: src/IceDefs.h

Issue 865973006: Subzero: Make thread_local work under MacOS 10.6. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: ATTRIBUTE_TLS --> ICE_ATTRIBUTE_TLS Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceGlobalContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceGlobalContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698