mirror of
https://gitee.com/openharmony/third_party_spirv-tools
synced 2024-11-30 11:00:47 +00:00
Erase decorations removed from internal collections
Fixes Android arm-64-v8a build with NDK r14. That's because we no longer ignore the result of the std::remove.
This commit is contained in:
parent
3c2e4c7d99
commit
188cd3780d
@ -305,12 +305,13 @@ void DecorationManager::RemoveInstructionFromTarget(ir::Instruction* inst,
|
||||
const uint32_t target_id) {
|
||||
auto const group_iter = group_to_decoration_insts_.find(target_id);
|
||||
if (group_iter != group_to_decoration_insts_.end()) {
|
||||
remove(group_iter->second.begin(), group_iter->second.end(), inst);
|
||||
auto& insts = group_iter->second;
|
||||
insts.erase(std::remove(insts.begin(), insts.end(), inst), insts.end());
|
||||
} else {
|
||||
auto target_list_iter = id_to_decoration_insts_.find(target_id);
|
||||
if (target_list_iter != id_to_decoration_insts_.end()) {
|
||||
remove(target_list_iter->second.begin(), target_list_iter->second.end(),
|
||||
inst);
|
||||
auto& insts = target_list_iter->second;
|
||||
insts.erase(std::remove(insts.begin(), insts.end(), inst), insts.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user