[llvm-commits] [llvm] r152624 - /llvm/trunk/include/llvm/Instructions.h

Stepan Dyatkovskiy stpworld at narod.ru
Tue Mar 13 05:37:11 PDT 2012


Author: dyatkovskiy
Date: Tue Mar 13 07:37:10 2012
New Revision: 152624

URL: http://llvm.org/viewvc/llvm-project?rev=152624&view=rev
Log:
Fixed comments for SwitchInst::addCase and for SwitchInst::removeCase.

Modified:
    llvm/trunk/include/llvm/Instructions.h

Modified: llvm/trunk/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=152624&r1=152623&r2=152624&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Tue Mar 13 07:37:10 2012
@@ -2680,14 +2680,17 @@
   }
 
   /// 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; }





More information about the llvm-commits mailing list