aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/System
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2009-12-07 05:29:59 +0000
committerOscar Fuentes <ofv@wanadoo.es>2009-12-07 05:29:59 +0000
commit4aafc85f5a94802c121050ec113973249e295577 (patch)
tree73c65c1ebedcf50a6e978cf77178e8bfd452457c /include/llvm/System
parent18552eb96f80811caa9f48141219ebeb2eadc5b3 (diff)
downloadexternal_llvm-4aafc85f5a94802c121050ec113973249e295577.zip
external_llvm-4aafc85f5a94802c121050ec113973249e295577.tar.gz
external_llvm-4aafc85f5a94802c121050ec113973249e295577.tar.bz2
Fixes the Atomic implementation if compiled by MSVC compiler.
sys::cas_flag should be long on this platform, InterlockedAdd() is defined only for the Itanium architecture (according to MSDN). Patch by Michael Beck! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
-rw-r--r--include/llvm/System/Atomic.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/System/Atomic.h b/include/llvm/System/Atomic.h
index 0c05d69..fc19369 100644
--- a/include/llvm/System/Atomic.h
+++ b/include/llvm/System/Atomic.h
@@ -20,7 +20,11 @@ namespace llvm {
namespace sys {
void MemoryFence();
+#ifdef _MSC_VER
+ typedef long cas_flag;
+#else
typedef uint32_t cas_flag;
+#endif
cas_flag CompareAndSwap(volatile cas_flag* ptr,
cas_flag new_value,
cas_flag old_value);