This lets the compiler reason about the type more easily. No
functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315180
91177308-0d34-0410-b5e6-
96231b3b80d8
using reverse_iterator = std::reverse_iterator<iterator>;
/// Construct an empty MutableArrayRef.
- /*implicit*/ MutableArrayRef() : ArrayRef<T>() {}
+ /*implicit*/ MutableArrayRef() = default;
/// Construct an empty MutableArrayRef from None.
/*implicit*/ MutableArrayRef(NoneType) : ArrayRef<T>() {}
intptr_t Value;
public:
- PointerIntPair() : Value(0) {}
+ constexpr PointerIntPair() : Value(0) {}
PointerIntPair(PointerTy PtrVal, IntType IntVal) {
setPointerAndInt(PtrVal, IntVal);
}
typedef detail::PointerSumTypeHelper<TagT, MemberTs...> HelperT;
public:
- PointerSumType() : Value(0) {}
+ constexpr PointerSumType() : Value(0) {}
/// A typed constructor for a specific tagged member of the sum type.
template <TagT N>
};
/// Construct an invalid index.
- SlotIndex() : lie(nullptr, 0) {}
+ SlotIndex() = default;
// Construct a new slot index from the given one, and set the slot.
SlotIndex(const SlotIndex &li, Slot s) : lie(li.listEntry(), unsigned(s)) {
protected:
PointerIntPair<InstrTy*, 1, bool> I;
- CallSiteBase() : I(nullptr, false) {}
+ CallSiteBase() = default;
CallSiteBase(CallTy *CI) : I(CI, true) { assert(CI); }
CallSiteBase(InvokeTy *II) : I(II, false) { assert(II); }
explicit CallSiteBase(ValTy *II) { *this = get(II); }
/// Note that this class must remain a simple POD value class, because we need
/// it to live in unions etc.
class MCValue {
- const MCSymbolRefExpr *SymA, *SymB;
- int64_t Cst;
- uint32_t RefKind;
+ const MCSymbolRefExpr *SymA = nullptr, *SymB = nullptr;
+ int64_t Cst = 0;
+ uint32_t RefKind = 0;
+
public:
- MCValue() : SymA(nullptr), SymB(nullptr), Cst(0), RefKind(0) {}
+ MCValue() = default;
int64_t getConstant() const { return Cst; }
const MCSymbolRefExpr *getSymA() const { return SymA; }
const MCSymbolRefExpr *getSymB() const { return SymB; }
static_assert(Width <= 64, "invalid integer width for digits");
private:
- DigitsType Digits;
- int16_t Scale;
+ DigitsType Digits = 0;
+ int16_t Scale = 0;
public:
- ScaledNumber() : Digits(0), Scale(0) {}
+ ScaledNumber() = default;
- ScaledNumber(DigitsType Digits, int16_t Scale)
+ constexpr ScaledNumber(DigitsType Digits, int16_t Scale)
: Digits(Digits), Scale(Scale) {}
private: