@@ -344,7 +344,7 @@ bool SPIRVTypeScavenger::unifyType(Type *T1, Type *T2) {
344
344
return false ;
345
345
if (!unifyType (FT1->getReturnType (), FT2->getReturnType ()))
346
346
return false ;
347
- for (auto [PT1, PT2] : zip (FT1->params (), FT2->params ()))
347
+ for (const auto & [PT1, PT2] : zip (FT1->params (), FT2->params ()))
348
348
if (!unifyType (PT1, PT2))
349
349
return false ;
350
350
return true ;
@@ -414,7 +414,7 @@ void SPIRVTypeScavenger::typeModule(Module &M) {
414
414
// If there are any type variables we couldn't resolve, fallback to assigning
415
415
// them as an i8* type.
416
416
Type *Int8Ty = Type::getInt8Ty (M.getContext ());
417
- for (auto [TypeVarNum, TypeVar] : enumerate(TypeVariables)) {
417
+ for (const auto & [TypeVarNum, TypeVar] : enumerate(TypeVariables)) {
418
418
unsigned PrimaryVar = UnifiedTypeVars.join (TypeVarNum, TypeVarNum);
419
419
Type *LeaderTy = TypeVariables[PrimaryVar];
420
420
if (TypeVar)
@@ -605,7 +605,8 @@ bool SPIRVTypeScavenger::typeIntrinsicCall(
605
605
void SPIRVTypeScavenger::typeFunctionParams (
606
606
CallBase &CB, FunctionType *FT, unsigned ArgStart, bool IncludeRet,
607
607
SmallVectorImpl<TypeRule> &TypeRules) {
608
- for (auto [U, ArgTy] : zip (drop_begin (CB.args (), ArgStart), FT->params ())) {
608
+ for (const auto &[U, ArgTy] :
609
+ zip (drop_begin (CB.args (), ArgStart), FT->params ())) {
609
610
if (hasPointerType (U->getType ())) {
610
611
TypeRules.push_back (TypeRule::is (U, ArgTy));
611
612
}
0 commit comments