mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
[C++11] Remove the R-value reference #if usage from the ADT and Support
libraries. It is now always 1 in LLVM builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -98,13 +98,9 @@
|
||||
# define LLVM_HAS_VARIADIC_TEMPLATES 0
|
||||
#endif
|
||||
|
||||
/// llvm_move - Expands to ::std::move if the compiler supports
|
||||
/// r-value references; otherwise, expands to the argument.
|
||||
#if LLVM_HAS_RVALUE_REFERENCES
|
||||
/// llvm_move - Expands to ::std::move. This is a hold-over from when we did
|
||||
/// not support R-value references.
|
||||
#define llvm_move(value) (::std::move(value))
|
||||
#else
|
||||
#define llvm_move(value) (value)
|
||||
#endif
|
||||
|
||||
/// Expands to '&' if r-value references are supported.
|
||||
///
|
||||
|
||||
@@ -42,13 +42,8 @@ namespace llvm {
|
||||
class ConstantRange {
|
||||
APInt Lower, Upper;
|
||||
|
||||
#if LLVM_HAS_RVALUE_REFERENCES
|
||||
// If we have move semantics, pass APInts by value and move them into place.
|
||||
typedef APInt APIntMoveTy;
|
||||
#else
|
||||
// Otherwise pass by const ref to save one copy.
|
||||
typedef const APInt &APIntMoveTy;
|
||||
#endif
|
||||
|
||||
public:
|
||||
/// Initialize a full (the default) or empty set for the specified bit width.
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#endif
|
||||
|
||||
namespace llvm {
|
||||
#if LLVM_HAS_CXX11_TYPETRAITS && LLVM_HAS_RVALUE_REFERENCES
|
||||
template<class T, class V>
|
||||
typename std::enable_if< std::is_constructible<T, V>::value
|
||||
, typename std::remove_reference<V>::type>::type &&
|
||||
@@ -40,12 +39,6 @@ typename std::enable_if< !std::is_constructible<T, V>::value
|
||||
moveIfMoveConstructible(V &Val) {
|
||||
return Val;
|
||||
}
|
||||
#else
|
||||
template<class T, class V>
|
||||
V &moveIfMoveConstructible(V &Val) {
|
||||
return Val;
|
||||
}
|
||||
#endif
|
||||
|
||||
/// \brief Stores a reference that can be changed.
|
||||
template <typename T>
|
||||
@@ -143,7 +136,6 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if LLVM_HAS_RVALUE_REFERENCES
|
||||
ErrorOr(ErrorOr &&Other) {
|
||||
moveConstruct(std::move(Other));
|
||||
}
|
||||
@@ -163,7 +155,6 @@ public:
|
||||
moveAssign(std::move(Other));
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
~ErrorOr() {
|
||||
if (!HasError)
|
||||
@@ -223,7 +214,6 @@ private:
|
||||
new (this) ErrorOr(Other);
|
||||
}
|
||||
|
||||
#if LLVM_HAS_RVALUE_REFERENCES
|
||||
template <class OtherT>
|
||||
void moveConstruct(ErrorOr<OtherT> &&Other) {
|
||||
if (!Other.HasError) {
|
||||
@@ -245,7 +235,6 @@ private:
|
||||
this->~ErrorOr();
|
||||
new (this) ErrorOr(std::move(Other));
|
||||
}
|
||||
#endif
|
||||
|
||||
pointer toPointer(pointer Val) {
|
||||
return Val;
|
||||
|
||||
@@ -664,10 +664,8 @@ private:
|
||||
public:
|
||||
typedef char char_type;
|
||||
|
||||
#if LLVM_HAS_RVALUE_REFERENCES
|
||||
mapped_file_region(mapped_file_region&&);
|
||||
mapped_file_region &operator =(mapped_file_region&&);
|
||||
#endif
|
||||
|
||||
/// Construct a mapped_file_region at \a path starting at \a offset of length
|
||||
/// \a length and with access \a mode.
|
||||
|
||||
@@ -52,13 +52,11 @@ namespace llvm {
|
||||
std::swap(error, regex.error);
|
||||
return *this;
|
||||
}
|
||||
#if LLVM_HAS_RVALUE_REFERENCES
|
||||
Regex(Regex &®ex) {
|
||||
preg = regex.preg;
|
||||
error = regex.error;
|
||||
regex.preg = NULL;
|
||||
}
|
||||
#endif
|
||||
~Regex();
|
||||
|
||||
/// isValid - returns the error encountered during regex compilation, or
|
||||
|
||||
Reference in New Issue
Block a user