File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -6404,7 +6404,7 @@ class SpirvOperand {
64046404 SpirvOperand () : Kind(Invalid), ResultType(), Value() {}
64056405
64066406 SpirvOperand (SpirvOperandKind Kind, QualType ResultType, llvm::APInt Value)
6407- : Kind(Kind), ResultType(ResultType), Value(Value) {}
6407+ : Kind(Kind), ResultType(ResultType), Value(std::move( Value) ) {}
64086408
64096409 SpirvOperand (const SpirvOperand &Other) { *this = Other; }
64106410 ~SpirvOperand () {}
@@ -6438,11 +6438,11 @@ class SpirvOperand {
64386438 }
64396439
64406440 static SpirvOperand createConstant (QualType ResultType, llvm::APInt Val) {
6441- return SpirvOperand (ConstantId, ResultType, Val);
6441+ return SpirvOperand (ConstantId, ResultType, std::move ( Val) );
64426442 }
64436443
64446444 static SpirvOperand createLiteral (llvm::APInt Val) {
6445- return SpirvOperand (Literal, QualType (), Val);
6445+ return SpirvOperand (Literal, QualType (), std::move ( Val) );
64466446 }
64476447
64486448 static SpirvOperand createType (QualType T) {
Original file line number Diff line number Diff line change @@ -421,14 +421,12 @@ static llvm::Type *getInlineSpirvType(CodeGenModule &CGM,
421421 case SpirvOperandKind::ConstantId: {
422422 llvm::Type *IntegralType =
423423 CGM.getTypes ().ConvertType (Operand.getResultType ());
424- llvm::APInt Value = Operand.getValue ();
425424
426- Result = getInlineSpirvConstant (CGM, IntegralType, Value );
425+ Result = getInlineSpirvConstant (CGM, IntegralType, Operand. getValue () );
427426 break ;
428427 }
429428 case SpirvOperandKind::Literal: {
430- llvm::APInt Value = Operand.getValue ();
431- Result = getInlineSpirvConstant (CGM, nullptr , Value);
429+ Result = getInlineSpirvConstant (CGM, nullptr , Operand.getValue ());
432430 break ;
433431 }
434432 case SpirvOperandKind::TypeId: {
You can’t perform that action at this time.
0 commit comments