trad_frame_saved_reg *
trad_frame_alloc_saved_regs (struct gdbarch *gdbarch)
{
-#ifdef HAVE_IS_TRIVIALLY_CONSTRUCTIBLE
static_assert (std::is_trivially_constructible<trad_frame_saved_reg>::value);
-#endif
int numregs = gdbarch_num_cooked_regs (gdbarch);
trad_frame_saved_reg *this_saved_regs
#define CHECK_TRAIT(TRAIT) \
static_assert (std::TRAIT<gdb::array_view<gdb_byte>>::value, "")
-#if HAVE_IS_TRIVIALLY_COPYABLE
-
CHECK_TRAIT (is_trivially_copyable);
CHECK_TRAIT (is_trivially_move_assignable);
CHECK_TRAIT (is_trivially_move_constructible);
CHECK_TRAIT (is_trivially_destructible);
-#endif
-
#undef CHECK_TRAIT
/* Wrapper around std::is_convertible to make the code using it a bit
DEF_ENUM_FLAGS_TYPE (RE2, EF2);
DEF_ENUM_FLAGS_TYPE (URE, UEF);
-#if HAVE_IS_TRIVIALLY_COPYABLE
-
/* So that std::vectors of types that have enum_flags fields can
reallocate efficiently memcpy. */
static_assert (std::is_trivially_copyable<EF>::value);
-#endif
-
/* A couple globals used as lvalues in the CHECK_VALID expressions
below. Their names (and types) match the uppercase type names
exposed by CHECK_VALID just to make the expressions easier to
#define CHECK_TRAIT(TRAIT) \
static_assert (std::TRAIT<packed<test_enum, 1>>::value, "")
-#if HAVE_IS_TRIVIALLY_COPYABLE
-
CHECK_TRAIT (is_trivially_copyable);
CHECK_TRAIT (is_trivially_copy_constructible);
CHECK_TRAIT (is_trivially_move_constructible);
CHECK_TRAIT (is_trivially_copy_assignable);
CHECK_TRAIT (is_trivially_move_assignable);
-#endif
-
#undef CHECK_TRAIT
/* Entry point. */
(put (intern "HAVE_USEFUL_SBRK") :check-ok t)
(put (intern "HAVE_SOCKETS") :check-ok t)
(put (intern "HAVE_F_GETFD") :check-ok t)
-(put (intern "HAVE_IS_TRIVIALLY_COPYABLE") :check-ok t)
-(put (intern "HAVE_IS_TRIVIALLY_CONSTRUCTIBLE") :check-ok t)
(put (intern "HAVE_DOS_BASED_FILE_SYSTEM") :check-ok t)
(defun check-read-config.in (file)
static_assert (alignof (packed) == 1);
/* Make sure packed can be wrapped with std::atomic. */
-#if HAVE_IS_TRIVIALLY_COPYABLE
static_assert (std::is_trivially_copyable<packed>::value);
-#endif
static_assert (std::is_copy_constructible<packed>::value);
static_assert (std::is_move_constructible<packed>::value);
static_assert (std::is_copy_assignable<packed>::value);
typename = gdb::Requires<gdb::Not<IsMemsettable<T>>>>
void *memset (T *s, int c, size_t n) = delete;
-#if HAVE_IS_TRIVIALLY_COPYABLE
-
/* Similarly, poison memcpy and memmove of non trivially-copyable
types, which is undefined. */
typename = gdb::Requires<gdb::Not<BothAreRelocatable<D, S>>>>
void *memmove (D *dest, const S *src, size_t n) = delete;
-#endif /* HAVE_IS_TRIVIALLY_COPYABLE */
-
/* Poison XNEW and friends to catch usages of malloc-style allocations on
objects that require new/delete. */
template<typename T>
-#if HAVE_IS_TRIVIALLY_CONSTRUCTIBLE
using IsMallocable = std::is_trivially_constructible<T>;
-#else
-using IsMallocable = std::true_type;
-#endif
template<typename T>
using IsFreeable = gdb::Or<std::is_trivially_destructible<T>, std::is_void<T>>;
#include <type_traits>
-/* GCC does not understand __has_feature. */
-#if !defined(__has_feature)
-# define __has_feature(x) 0
-#endif
-
-/* HAVE_IS_TRIVIALLY_COPYABLE is defined as 1 iff
- std::is_trivially_copyable is available. GCC only implemented it
- in GCC 5. */
-#if (__has_feature(is_trivially_copyable) \
- || (defined __GNUC__ && __GNUC__ >= 5))
-# define HAVE_IS_TRIVIALLY_COPYABLE 1
-#endif
-
-/* HAVE_IS_TRIVIALLY_CONSTRUCTIBLE is defined as 1 iff
- std::is_trivially_constructible is available. GCC only implemented it
- in GCC 5. */
-#if (__has_feature(is_trivially_constructible) \
- || (defined __GNUC__ && __GNUC__ >= 5))
-# define HAVE_IS_TRIVIALLY_CONSTRUCTIBLE 1
-#endif
-
namespace gdb {
/* Implementation of the detection idiom: