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 {
6404
6404
SpirvOperand () : Kind(Invalid), ResultType(), Value() {}
6405
6405
6406
6406
SpirvOperand (SpirvOperandKind Kind, QualType ResultType, llvm::APInt Value)
6407
- : Kind(Kind), ResultType(ResultType), Value(Value) {}
6407
+ : Kind(Kind), ResultType(ResultType), Value(std::move( Value) ) {}
6408
6408
6409
6409
SpirvOperand (const SpirvOperand &Other) { *this = Other; }
6410
6410
~SpirvOperand () {}
@@ -6438,11 +6438,11 @@ class SpirvOperand {
6438
6438
}
6439
6439
6440
6440
static SpirvOperand createConstant (QualType ResultType, llvm::APInt Val) {
6441
- return SpirvOperand (ConstantId, ResultType, Val);
6441
+ return SpirvOperand (ConstantId, ResultType, std::move ( Val) );
6442
6442
}
6443
6443
6444
6444
static SpirvOperand createLiteral (llvm::APInt Val) {
6445
- return SpirvOperand (Literal, QualType (), Val);
6445
+ return SpirvOperand (Literal, QualType (), std::move ( Val) );
6446
6446
}
6447
6447
6448
6448
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,
421
421
case SpirvOperandKind::ConstantId: {
422
422
llvm::Type *IntegralType =
423
423
CGM.getTypes ().ConvertType (Operand.getResultType ());
424
- llvm::APInt Value = Operand.getValue ();
425
424
426
- Result = getInlineSpirvConstant (CGM, IntegralType, Value );
425
+ Result = getInlineSpirvConstant (CGM, IntegralType, Operand. getValue () );
427
426
break ;
428
427
}
429
428
case SpirvOperandKind::Literal: {
430
- llvm::APInt Value = Operand.getValue ();
431
- Result = getInlineSpirvConstant (CGM, nullptr , Value);
429
+ Result = getInlineSpirvConstant (CGM, nullptr , Operand.getValue ());
432
430
break ;
433
431
}
434
432
case SpirvOperandKind::TypeId: {
You can’t perform that action at this time.
0 commit comments