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

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: 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..f32cdcc0e20ef1523f224ee65aa3932913f04e16 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 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 ATTRIBUTE_TLS __declspec(thread)
+#else // !_MSC_VER
+#define ATTRIBUTE_TLS __thread
+#endif // !_MSC_VER
JF 2015/01/23 18:17:55 SUBZERO_ATTRIBUTE_TLS
Jim Stichnoth 2015/01/23 18:22:30 Done (using ICE_ATTRIBUTE_TLS instead).
+
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