Hi, I would like to propose this patch to makes it possible to compile any builtin if -fno-builtin is passed.
Here is the problem I am trying to get around.
I am working on a out-of-tree target where atomic operations are expanded
to function calls.
for example:
setOperationAction(ISD::ATOMIC_SWAP, MVT::i32, Expand);
The backend will replace some atomic operations when compiling libc++ with
function calls. Now if I try to actually compile the function calls with
clang I'll get errors like:
definition of builtin function '__sync_lock_test_and_set_4'
Just as if I was trying to compile a file similar to
http://www.opensource.apple.com/source/Libc/Libc-583/arm/sys/gcc_atomic.c with
clang.
Any objection? Or any possible workaround?
allow-built-in-definition.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
