[PATCH] D30025: [compiler-rt] [builtins] Fix building atomic.c with GCC

2017-02-24 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a reviewer: doug.gregor. mgorny added a subscriber: doug.gregor. mgorny added a comment. If I read the git correctly, the change that forbid defining builtins was initially made in https://reviews.llvm.org/rL64639. @doug.gregor, any chance you could help us over here? Is clang

[PATCH] D30025: [compiler-rt] [builtins] Fix building atomic.c with GCC

2017-02-16 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Note that the normal compiler-rt functions have a different name than the builtins they provide, at least from the C frontend view. Repository: rL LLVM https://reviews.llvm.org/D30025 ___ cfe-commits mailing list

[PATCH] D30025: [compiler-rt] [builtins] Fix building atomic.c with GCC

2017-02-16 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. No, it's a bug in clang. Clang does not reject other functions that are used to implement builtins (if it did, compiler-rt would be a lot more difficult to build). Repository: rL LLVM https://reviews.llvm.org/D30025

[PATCH] D30025: [compiler-rt] [builtins] Fix building atomic.c with GCC

2017-02-16 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. In https://reviews.llvm.org/D30025#678462, @theraven wrote: > This code is working around something that's probably a clang bug. It would > be better to fix the clang bug than add more complex workarounds. Well, clang explicitly rejects those functions as errors, so I

[PATCH] D30025: [compiler-rt] [builtins] Fix building atomic.c with GCC

2017-02-15 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. Herald added a subscriber: dberris. Make the use of #pragma redefine_extname and appropriate renames of builtins conditional to using clang. GCC used not to support it outside Solaris and currently seems to be very restrictive on applying it. In other words, it does