File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,9 @@ public SwiftObjectHeader {
153153 ~SILBasicBlock ();
154154
155155 enum { numCustomBits = std::numeric_limits<CustomBitsType>::digits };
156- enum { maxBitfieldID = std::numeric_limits<uint64_t >::max () };
156+
157+ constexpr static const size_t maxBitfieldID =
158+ std::numeric_limits<uint64_t >::max();
157159
158160 // / Gets the ID (= index in the function's block list) of the block.
159161 // /
Original file line number Diff line number Diff line change @@ -127,7 +127,9 @@ class alignas(8) SILNode :
127127 enum { NumMarkDependenceKindBits = 2 };
128128
129129 enum { numCustomBits = 20 };
130- enum { maxBitfieldID = std::numeric_limits<uint64_t >::max () >> numCustomBits };
130+
131+ constexpr static const size_t maxBitfieldID =
132+ std::numeric_limits<uint64_t >::max () >> numCustomBits;
131133
132134protected:
133135 friend class SILInstruction ;
Original file line number Diff line number Diff line change @@ -1021,7 +1021,9 @@ ValueOwnershipKind::getForwardingOperandOwnership(bool allowUnowned) const {
10211021class Operand {
10221022public:
10231023 enum { numCustomBits = 8 };
1024- enum { maxBitfieldID = std::numeric_limits<uint64_t >::max () >> numCustomBits };
1024+
1025+ constexpr static const size_t maxBitfieldID =
1026+ std::numeric_limits<uint64_t >::max() >> numCustomBits;
10251027
10261028private:
10271029 template <class , class > friend class SILBitfield ;
You can’t perform that action at this time.
0 commit comments