Skip to content
Commit a678c674 authored by Duncan P. N. Exon Smith's avatar Duncan P. N. Exon Smith
Browse files

IR: Fix const-correctness of SwitchInst::CaseIterator and CaseHandle

Fix some confusion between the two types of `const` a pointer/iterator
can have. Users of a SwitchInst::CaseIterator should not (and do not!)
manually mutate the SwitchInst::CaseHandle that tracks its internal
state. Change operator*() to return `const CaseHandle&`, remove the
non-const-qualified operator*(), and const-qualify
CaseHandle::setValue() and CaseHandle::setSuccessor().

Differential Revision: https://reviews.llvm.org/D113788
parent c3edab8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment