search for: __has_feature

Displaying 20 results from an estimated 25 matches for "__has_feature".

2015 Feb 16
2
[LLVMdev] Do we still need LLVM_HAS_INITIALIZER_LISTS?
Currently, LLVM_HAS_INITIALIZER_LISTS is set based on __has_feature(cxx_generalized_initializers) && !defined(_MSC_VER) Based on the docs, we should be able to drop the _MSC_VER check now that we've moved to VS2013. Can somebody confirm that? The other problem is that GCC doesn't recognize __has_feature, so this is essentially only enabled for cla...
2017 Jun 02
3
Failed to build libunwind the libcxx's __config header
...../projects/libunwind/src/UnwindLevel1.c In file included from ../projects/libcxx/include/inttypes.h:234:0, from ../projects/libunwind/src/UnwindLevel1.c:22: ../projects/libcxx/include/__config:1140:18: error: missing binary operator before token "(" __has_feature(attribute_availability_with_strict) && \ ^ The exact line that fails: https://github.com/llvm-mirror/libcxx/blob/master/include/__config#L1140 Does anyone else have this problem? What can possibly cause such error? Regards, Dmitry
2014 Feb 24
3
[LLVMdev] RFC: Adding __INTEGRATED_ASSEMLER__ macro
First, I would assume this would be better spelled as: __has_feature(integrated_assembler) But I agree with others that "integrated assembler" isn't a feature which should be observable in source code. On Sun, Feb 23, 2014 at 4:27 PM, Renato Golin <renato.golin at linaro.org>wrote: > On a higher level, there's the quality issue. People...
2014 Feb 25
2
[LLVMdev] RFC: Adding __INTEGRATED_ASSEMLER__ macro
...ure support macros and >>> extensions, which means it doesn't really matter what tool you're >>> using, if that tool supports feature A, you can use it. >>> >> >> Very much. If we have specific assembler features, we should expose them >> through __has_feature, but they should be source code visible features >> rather than "my code compiles faster with fewer temporary files" features. >> > > Unfortunately, its not that simple. The IAS is not a perfect drop in > replacement. As a concrete example, on ARM, the IAS does not...
2019 Dec 29
2
__c11_atomic builtins' input requirements
...alignment, format, size etc.? Is it required that the destination argument be annotated as _Atomic like the corresponding standard c11 functions require? The following code in libcxx/include/config implies that the c11 atomic builtins should be substituted for gcc atomic builtins if present: #if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic) # define _LIBCPP_HAS_C_ATOMIC_IMP #elif defined(_LIBCPP_COMPILER_GCC) # define _LIBCPP_HAS_GCC_ATOMIC_IMP #endif To implement atomic_ref, it might be cleaner to use the gcc builtins. By doing so, we avoid depending on the inte...
2017 Dec 01
2
[Release-testers] 5.0.1-rc2 has been tagged
...ist; -/* zig: added because glibc stdio.h was duplicately defining va_list - */ -#define _VA_LIST_DEFINED #endif #endif /* __STDARG_H */ diff --git a/c_headers/stddef.h b/c_headers/stddef.h index 3b55d42c..73549967 100644 --- a/c_headers/stddef.h +++ b/c_headers/stddef.h @@ -48,13 +48,7 @@ #if !__has_feature(modules) #define _PTRDIFF_T #endif - -/* Zig: wrap in _PTRDIFF_T_DEFINED to protect against mingw defining it twice */ -#if !defined(_PTRDIFF_T_DEFINED) typedef __PTRDIFF_TYPE__ ptrdiff_t; -#define _PTRDIFF_T_DEFINED -#endif - #endif #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t)...
2015 Feb 17
2
[LLVMdev] Do we still need LLVM_HAS_INITIALIZER_LISTS?
On Mon, Feb 16, 2015 at 10:30 PM, David Majnemer <david.majnemer at gmail.com> wrote: > > > On Mon, Feb 16, 2015 at 3:56 PM, Justin Bogner <mail at justinbogner.com> > wrote: >> >> Currently, LLVM_HAS_INITIALIZER_LISTS is set based on >> >> __has_feature(cxx_generalized_initializers) && !defined(_MSC_VER) >> >> Based on the docs, we should be able to drop the _MSC_VER check now that >> we've moved to VS2013. Can somebody confirm that? >> > > MSDN claims that VS2013 supports braced initializer list syntax: &...
2013 Jun 14
4
[LLVMdev] DataFlowSanitizer design discussion
...e it doesn't > really sanitize anything. As Reid mentioned, a goal is to build sanitizer-like tools on top of this instrumentation. Not only that, but one of the things that an application can do is turn on its own sources and sinks in response to the instrumentation being enabled (via the __has_feature macro). So really, -fsanitize=dataflow would be the flag that turns on data-flow sanitization for an application designed for it. And should the component of the compiler that allows this data-flow sanitization be named any differently? Thanks, -- Peter
2014 Feb 24
3
[LLVMdev] RFC: Adding __INTEGRATED_ASSEMLER__ macro
This seems to be a slightly contentious suggestion, so it seems fitting to bring it up on cfe-dev. Given that -fintegrated-as and -fno-integrated-as are available to the user, and that the integrated assembler can be a bit stringent (as compared to GAS at least, which, for example, supports deprecated syntax), it might be nice to permit the user to detect that an integrated assembler is in use.
2013 Jun 14
0
[LLVMdev] DataFlowSanitizer design discussion
...ally sanitize anything. > > As Reid mentioned, a goal is to build sanitizer-like tools on top of > this instrumentation. Not only that, but one of the things that an > application can do is turn on its own sources and sinks in response > to the instrumentation being enabled (via the __has_feature macro). > So really, -fsanitize=dataflow would be the flag that turns on > data-flow sanitization for an application designed for it. And should > the component of the compiler that allows this data-flow sanitization > be named any differently? > > Thanks, > -- > Peter >...
2012 Mar 01
2
[LLVMdev] Proposed implementation of N3333 hashing interfaces for LLVM (and possible libc++)
...the leading && and propose this reflowed text: template <typename T> struct is_hashable_data : integral_constant<bool, ((is_integral<T>::value || is_pointer<T>::value) && 64 % sizeof(T) == 0)> {}; . #if __has_feature(__cxx_variadic_templates__) I'm pretty sure non-clang compilers will bark at that unless you #define'd __has_feature(X) to 0? --- a/unittests/ADT/HashingTest.cpp +++ b/unittests/ADT/HashingTest.cpp @@ -13,45 +13,295 @@ #include "gtest/gtest.h" #include "llvm/ADT/Hashing....
2012 Jul 02
4
[LLVMdev] PROPOSAL: LLVM_FALLTHROUGH macro for intended fall-throughs between switch cases
...makes sense to wrap [[clang::fallthrough]]to a macro, so the code would continue to work in c++98 mode, but in c++11 mode it would also allow to run this diagnostic (btw, is llvm compilable in c++11 mode?). Sample implementation of the macro (see * fallthrough-macro.diff*): *#ifdef __clang__ **#if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") * *#define LLVM_FALLTHROUGH [[clang::fallthrough]] **#endif **#endif ****#ifndef LLVM_FALLTHROUGH **#define LLVM_FALLTHROUGH do { } while (0) **#endif* After this we can start using *-Wimplicit-fallthrough*. Please expre...
2016 Sep 22
0
[ANNOUNCE] xproto 7.0.30
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeremy Huddleston Sequoia (5): Xfuncproto.h: Define __has_feature() if it isn't already Xfuncproto.h: Define __has_extension() if it isn't already Xfuncproto: Add support for _X_DEPRECATED_MSG() macro Xfuncproto: Add support for _X_NOTSAN macro xproto 7.0.30 git tag: xproto-7.0.30 https://xorg.freedesktop.org/archive/individual/p...
2013 Jun 13
0
[LLVMdev] DataFlowSanitizer design discussion
Could you maybe give some example use cases? Also, "sanitizer" may not be the best name for this, since it doesn't really sanitize anything. -- Sean Silva -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130613/89f3df75/attachment.html>
2012 Oct 23
0
[LLVMdev] Status of YAML IO?
...rogramming used by YAML I/O work in C++03? My current implementation was written in C++11, but then back ported to C++03 in a way that works with clang, but may not work with other compilers. Here is an example: template <class T> struct has_output { private: static double test(...); #if __has_feature(cxx_access_control_sfinae) template <class U, class X> static auto test(U& u, X& x) -> decltype(U::output(std::declval<const X&>(), std::declval<llvm::raw_ostream&>()), char()); #else template <class U, class X> static __typeof__(U::output(st...
2012 Oct 22
2
[LLVMdev] Status of YAML IO?
Hey Nick, what's the status on YAML IO? The other thread seems to have died. -- Sean Silva
2012 Feb 29
0
[LLVMdev] Proposed implementation of N3333 hashing interfaces for LLVM (and possible libc++)
Thanks for the feedback thus far! I've updated the header file, and enclosed a complete patch against LLVM. This passes all the regtests, and I'll be doing more thorough testing of LLVM itself with the patch. I've included some basic unit tests, but could probably do more here... Not sure it's worth delaying the initial submission though, as the best testing is to use a hash
2018 Jan 24
2
[llvm] r322838 - [ADT] Split optional to only include copy mechanics and dtor for non-trivial types.
...vm/trunk/unittests/ADT/OptionalTest.cpp (original) > +++ llvm/trunk/unittests/ADT/OptionalTest.cpp Thu Jan 18 03:26:24 2018 > @@ -518,5 +518,14 @@ TEST_F(OptionalTest, OperatorGreaterEqua > CheckRelation<GreaterEqual>(InequalityLhs, InequalityRhs, !IsLess); > } > > +#if (__has_feature(is_trivially_copyable) && defined(_LIBCPP_VERSION)) > || \ > + (defined(__GNUC__) && __GNUC__ >= 5) > +static_assert(std::is_trivially_copyable<Optional<int>>::value, > + "Should be trivially copyable"); > +static_assert(...
2012 Jul 26
0
[LLVMdev] PROPOSAL: LLVM_FALLTHROUGH macro for intended fall-throughs between switch cases
...de would continue to work >>> in c++98 mode, but in c++11 mode it would also allow to run this diagnostic >>> (btw, is llvm compilable in c++11 mode?). Sample implementation of the >>> macro (see *fallthrough-macro.diff*): >>> *#ifdef __clang__ >>> **#if __has_feature(cxx_attributes) && >>> __has_warning("-Wimplicit-fallthrough") >>> * >>> *#define LLVM_FALLTHROUGH [[clang::fallthrough]] >>> **#endif >>> **#endif >>> ****#ifndef LLVM_FALLTHROUGH >>> **#define LLVM_FALLTHROUGH do { }...
2017 Nov 30
9
5.0.1-rc2 has been tagged
Hi, I've tagged the 5.0.1-rc2 release, go ahead and start testing and report your results. -Tom