mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2025-01-14 18:30:19 +00:00
Opt: Remove unused lambda captures
Those are reported as errors by clang 5.0.0, due to the flags -Werror and -Wunused-lambda-capture.
This commit is contained in:
parent
137953538a
commit
69043963e4
@ -651,7 +651,7 @@ void InlinePass::InitializeInline(ir::IRContext* c) {
|
||||
InitializeProcessing(c);
|
||||
|
||||
// Don't bother updating the DefUseManger
|
||||
update_def_use_mgr_ = [this](ir::Instruction&, bool) {};
|
||||
update_def_use_mgr_ = [](ir::Instruction&, bool) {};
|
||||
|
||||
false_id_ = 0;
|
||||
|
||||
|
@ -125,7 +125,7 @@ void LocalSingleStoreElimPass::CalculateImmediateDominators(
|
||||
successors_map_.clear();
|
||||
for (auto& blk : *func) {
|
||||
ordered_blocks.push_back(&blk);
|
||||
blk.ForEachSuccessorLabel([&blk, &ordered_blocks, this](uint32_t sbid) {
|
||||
blk.ForEachSuccessorLabel([&blk, this](uint32_t sbid) {
|
||||
successors_map_[&blk].push_back(label2block_[sbid]);
|
||||
predecessors_map_[label2block_[sbid]].push_back(&blk);
|
||||
});
|
||||
|
@ -795,10 +795,9 @@ bool MemPass::RemoveUnreachableBlocks(ir::Function* func) {
|
||||
// If the block is reachable and has Phi instructions, remove all
|
||||
// operands from its Phi instructions that reference unreachable blocks.
|
||||
// If the block has no Phi instructions, this is a no-op.
|
||||
block.ForEachPhiInst(
|
||||
[&block, &reachable_blocks, this](ir::Instruction* phi) {
|
||||
RemovePhiOperands(phi, reachable_blocks);
|
||||
});
|
||||
block.ForEachPhiInst([&reachable_blocks, this](ir::Instruction* phi) {
|
||||
RemovePhiOperands(phi, reachable_blocks);
|
||||
});
|
||||
}
|
||||
|
||||
// Erase unreachable blocks.
|
||||
|
Loading…
Reference in New Issue
Block a user