aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStepan Dyatkovskiy <stpworld@narod.ru>2012-03-13 12:37:10 +0000
committerStepan Dyatkovskiy <stpworld@narod.ru>2012-03-13 12:37:10 +0000
commitc347b6f4b600368751f6f79d270bf58f7d54a348 (patch)
treefa518636e969ad6cfd5fce81bb67725b4e94317f
parent0aa85eb231dc76bcabcd35f6dc9a50536f607df3 (diff)
Fixed comments for SwitchInst::addCase and for SwitchInst::removeCase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152624 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Instructions.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index c40016c53d..e3676fe919 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -2680,14 +2680,17 @@ public:
}
/// addCase - Add an entry to the switch instruction...
- ///
+ /// Note:
+ /// This action invalidates case_end(). Old case_end() iterator will
+ /// point to the added case.
void addCase(ConstantInt *OnVal, BasicBlock *Dest);
/// removeCase - This method removes the specified case and its successor
/// from the switch instruction. Note that this operation may reorder the
/// remaining cases at index idx and above.
- /// Also note, that iterator becomes invalid after this operation.
- ///
+ /// Note:
+ /// This action invalidates iterators for all cases following the one removed,
+ /// including the case_end() iterator.
void removeCase(CaseIt i);
unsigned getNumSuccessors() const { return getNumOperands()/2; }