diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-13 00:45:38 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-13 00:45:38 +0000 |
commit | 01ba47d7b6c0dfabb9014e6d904b71e55f0428ed (patch) | |
tree | 7e4ef782e182dd3b4c97c1d4095f01698def671f /clang/lib/Lex/Lexer.cpp | |
parent | 18104239b4fc99ebbb808b12abeae5ef26bf9f36 (diff) | |
download | bcm5719-llvm-01ba47d7b6c0dfabb9014e6d904b71e55f0428ed.tar.gz bcm5719-llvm-01ba47d7b6c0dfabb9014e6d904b71e55f0428ed.zip |
Implement the missing pieces needed to support libstdc++4.7's <atomic>:
__atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_*
predefined macros.
Implement library fallback for __atomic_is_lock_free and
__c11_atomic_is_lock_free, and implement __atomic_always_lock_free.
Contrary to their documentation, GCC's __atomic_fetch_add family don't
multiply the operand by sizeof(T) when operating on a pointer type.
libstdc++ relies on this quirk. Remove this handling for all but the
__c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins.
Contrary to their documentation, __atomic_test_and_set and __atomic_clear
take a first argument of type 'volatile void *', not 'void *' or 'bool *',
and __atomic_is_lock_free and __atomic_always_lock_free have an argument
of type 'const volatile void *', not 'void *'.
With this change, libstdc++4.7's <atomic> passes libc++'s atomic test suite,
except for a couple of libstdc++ bugs and some cases where libc++'s test
suite tests for properties which implementations have latitude to vary.
llvm-svn: 154640
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
0 files changed, 0 insertions, 0 deletions