Make using an unsupported CAS size a hard error on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72088 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2009-05-19 01:08:36 +00:00
parent ecb1684d51
commit 84e5cac70a

View File

@ -68,8 +68,10 @@ namespace llvm {
T old_value) {
if (sizeof(T) == 4)
return InterlockedCompareExchange(ptr, new_value, old_value);
else
else if (sizeof(T) == 8)
return InterlockedCompareExchange64(ptr, new_value, old_value);
else
assert(0 && "Unsupported compare-and-swap size!");
}
template<typename T>