[Clang][ByteCode][NFC] Move APInt into pushInteger since it is being passed by value (#143578)
Static analysis flagged that we could move APInt instead of copy, indeed it has a move constructor and so we should move into values for APInt.
This commit is contained in:
@@ -1321,7 +1321,7 @@ static bool interp__builtin_ia32_pdep(InterpState &S, CodePtr OpPC,
|
||||
if (Mask[I])
|
||||
Result.setBitVal(I, Val[P++]);
|
||||
}
|
||||
pushInteger(S, Result, Call->getType());
|
||||
pushInteger(S, std::move(Result), Call->getType());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1344,7 +1344,7 @@ static bool interp__builtin_ia32_pext(InterpState &S, CodePtr OpPC,
|
||||
if (Mask[I])
|
||||
Result.setBitVal(P++, Val[I]);
|
||||
}
|
||||
pushInteger(S, Result, Call->getType());
|
||||
pushInteger(S, std::move(Result), Call->getType());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user