mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-25 21:10:04 +00:00
Qualify std::move. (#4741)
Clang added -Wunqualified-std-cast-call in https://reviews.llvm.org/D119670, which warns on unqualified std::move and std::forward calls. This change qualifies these calls to allow the project to build on HEAD Clang -Werror.
This commit is contained in:
parent
0ab57c2c42
commit
3820c4f6e2
@ -207,7 +207,7 @@ bool DeadBranchElimPass::SimplifyBranch(BasicBlock* block,
|
|||||||
Instruction::OperandList new_operands;
|
Instruction::OperandList new_operands;
|
||||||
new_operands.push_back(terminator->GetInOperand(0));
|
new_operands.push_back(terminator->GetInOperand(0));
|
||||||
new_operands.push_back({SPV_OPERAND_TYPE_ID, {live_lab_id}});
|
new_operands.push_back({SPV_OPERAND_TYPE_ID, {live_lab_id}});
|
||||||
terminator->SetInOperands(move(new_operands));
|
terminator->SetInOperands(std::move(new_operands));
|
||||||
context()->UpdateDefUse(terminator);
|
context()->UpdateDefUse(terminator);
|
||||||
} else {
|
} else {
|
||||||
// Check if the merge instruction is still needed because of a
|
// Check if the merge instruction is still needed because of a
|
||||||
|
@ -135,7 +135,7 @@ bool PrivateToLocalPass::MoveVariable(Instruction* variable,
|
|||||||
// Place the variable at the start of the first basic block.
|
// Place the variable at the start of the first basic block.
|
||||||
context()->AnalyzeUses(variable);
|
context()->AnalyzeUses(variable);
|
||||||
context()->set_instr_block(variable, &*function->begin());
|
context()->set_instr_block(variable, &*function->begin());
|
||||||
function->begin()->begin()->InsertBefore(move(var));
|
function->begin()->begin()->InsertBefore(std::move(var));
|
||||||
|
|
||||||
// Update uses where the type may have changed.
|
// Update uses where the type may have changed.
|
||||||
return UpdateUses(variable);
|
return UpdateUses(variable);
|
||||||
|
Loading…
Reference in New Issue
Block a user