@@ -521,8 +521,8 @@ class StoredIntegerElement: public LocatorPathElt {
521
521
522
522
template <unsigned Index = 0 ,
523
523
typename = typename std::enable_if<(Index < NumValues)>::type>
524
- static uint64_t packValue (unsigned value) {
525
- return uint64_t ( value) << (valueWidth () * (NumValues - Index - 1 ));
524
+ static uint64_t packValue (uint64_t value) {
525
+ return value << (valueWidth () * (NumValues - Index - 1 ));
526
526
}
527
527
528
528
static constexpr uint64_t valueMask =
@@ -531,28 +531,20 @@ class StoredIntegerElement: public LocatorPathElt {
531
531
public:
532
532
template <unsigned NumNumericInputs = NumValues,
533
533
typename = typename std::enable_if<NumNumericInputs == 1 >::type>
534
- StoredIntegerElement (ConstraintLocator::PathElementKind kind, unsigned value)
535
- : LocatorPathElt(kind, value) {
536
- assert (value == getValue<0 >() && " value truncated" );
537
- }
534
+ StoredIntegerElement (ConstraintLocator::PathElementKind kind, uint64_t value)
535
+ : LocatorPathElt(kind, value) { }
538
536
539
537
template <unsigned NumNumericInputs = NumValues,
540
538
typename = typename std::enable_if<NumNumericInputs == 2 >::type>
541
- StoredIntegerElement (ConstraintLocator::PathElementKind kind, unsigned value0, unsigned value1)
542
- : LocatorPathElt(kind, packValue<0 >(value0) | packValue<1 >(value1)) {
543
- assert (value0 == getValue<0 >() && " value0 truncated" );
544
- assert (value1 == getValue<1 >() && " value1 truncated" );
545
- }
539
+ StoredIntegerElement (ConstraintLocator::PathElementKind kind, uint32_t value0, uint32_t value1)
540
+ : LocatorPathElt(kind, packValue<0 >(value0) | packValue<1 >(value1)) { }
546
541
547
542
template <unsigned NumNumericInputs = NumValues,
548
543
typename = typename std::enable_if<NumNumericInputs == 3 >::type>
549
- StoredIntegerElement (ConstraintLocator::PathElementKind kind, unsigned value0,
550
- unsigned value1, unsigned value2)
551
- : LocatorPathElt(kind, packValue<0 >(value0) | packValue<1 >(value1) | packValue<2 >(value2)) {
552
- assert (value0 == getValue<0 >() && " value0 truncated" );
553
- assert (value1 == getValue<1 >() && " value1 truncated" );
554
- assert (value2 == getValue<2 >() && " value2 truncated" );
555
- }
544
+ StoredIntegerElement (ConstraintLocator::PathElementKind kind,
545
+ uint16_t value0, uint16_t value1, uint16_t value2)
546
+ : LocatorPathElt(kind,
547
+ packValue<0 >(value0) | packValue<1 >(value1) | packValue<2 >(value2)) { }
556
548
557
549
// / Retrieve a value associated with the path element.
558
550
template <unsigned Index = 0 ,
@@ -588,7 +580,7 @@ class StoredPointerElement: public LocatorPathElt {
588
580
589
581
class LocatorPathElt ::ApplyArgToParam final : public StoredIntegerElement<3 > {
590
582
public:
591
- ApplyArgToParam (unsigned argIdx, unsigned paramIdx, ParameterTypeFlags flags)
583
+ ApplyArgToParam (uint16_t argIdx, uint16_t paramIdx, ParameterTypeFlags flags)
592
584
: StoredIntegerElement(ConstraintLocator::ApplyArgToParam, argIdx, paramIdx, flags.toRaw()) {}
593
585
594
586
unsigned getArgIdx () const { return getValue<0 >(); }
0 commit comments