@@ -87,7 +87,7 @@ storageClassRequiresExplictLayout(SPIRV::StorageClass::StorageClass SC) {
8787}
8888
8989SPIRVGlobalRegistry::SPIRVGlobalRegistry (unsigned PointerSize)
90- : PointerSize(PointerSize), Bound(0 ) {}
90+ : PointerSize(PointerSize), Bound(0 ), CurMF( nullptr ) {}
9191
9292SPIRVType *SPIRVGlobalRegistry::assignIntTypeToVReg (unsigned BitWidth,
9393 Register VReg,
@@ -474,8 +474,8 @@ Register SPIRVGlobalRegistry::getOrCreateBaseRegister(
474474 }
475475 if (Type->getOpcode () == SPIRV::OpTypeFloat) {
476476 SPIRVType *SpvBaseType = getOrCreateSPIRVFloatType (BitWidth, I, TII);
477- return getOrCreateConstFP (dyn_cast <ConstantFP>(Val)->getValue (), I,
478- SpvBaseType, TII, ZeroAsNull);
477+ return getOrCreateConstFP (cast <ConstantFP>(Val)->getValue (), I, SpvBaseType ,
478+ TII, ZeroAsNull);
479479 }
480480 assert (Type->getOpcode () == SPIRV::OpTypeInt);
481481 SPIRVType *SpvBaseType = getOrCreateSPIRVIntegerType (BitWidth, I, TII);
@@ -1069,7 +1069,8 @@ SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
10691069 MIRBuilder);
10701070 };
10711071 }
1072- return getOpTypeStruct (SType, MIRBuilder, AccQual, Decorator, EmitIR);
1072+ return getOpTypeStruct (SType, MIRBuilder, AccQual, std::move (Decorator),
1073+ EmitIR);
10731074 }
10741075 if (auto FType = dyn_cast<FunctionType>(Ty)) {
10751076 SPIRVType *RetTy = findSPIRVType (FType->getReturnType (), MIRBuilder,
@@ -1406,8 +1407,9 @@ SPIRVType *SPIRVGlobalRegistry::getOrCreateLayoutType(
14061407 // We need a new OpTypeStruct instruction because decorations will be
14071408 // different from a struct with an explicit layout created from a different
14081409 // entry point.
1409- SPIRVType *SPIRVStructType = getOpTypeStruct (
1410- ST, MIRBuilder, SPIRV::AccessQualifier::None, Decorator, EmitIr);
1410+ SPIRVType *SPIRVStructType =
1411+ getOpTypeStruct (ST, MIRBuilder, SPIRV::AccessQualifier::None,
1412+ std::move (Decorator), EmitIr);
14111413 add (Key, SPIRVStructType);
14121414 return SPIRVStructType;
14131415}
0 commit comments