From a7c234a4ffbfb0878254ab91b6b52f08e5086c92 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Fri, 13 May 2016 21:23:08 +0000 Subject: [PATCH] fix documentation comments; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269485 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Instructions.h | 62 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/include/llvm/IR/Instructions.h b/include/llvm/IR/Instructions.h index 63fca499c29..def64ad2b5c 100644 --- a/include/llvm/IR/Instructions.h +++ b/include/llvm/IR/Instructions.h @@ -2951,7 +2951,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BranchInst, Value) //===----------------------------------------------------------------------===// //===--------------------------------------------------------------------------- -/// SwitchInst - Multiway switch +/// Multiway switch /// class SwitchInst : public TerminatorInst { void *operator new(size_t, unsigned) = delete; @@ -2967,17 +2967,17 @@ class SwitchInst : public TerminatorInst { void *operator new(size_t s) { return User::operator new(s); } - /// SwitchInst ctor - Create a new switch instruction, specifying a value to - /// switch on and a default destination. The number of additional cases can - /// be specified here to make memory allocation more efficient. This - /// constructor can also autoinsert before another instruction. + /// Create a new switch instruction, specifying a value to switch on and a + /// default destination. The number of additional cases can be specified here + /// to make memory allocation more efficient. This constructor can also + /// auto-insert before another instruction. SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases, Instruction *InsertBefore); - /// SwitchInst ctor - Create a new switch instruction, specifying a value to - /// switch on and a default destination. The number of additional cases can - /// be specified here to make memory allocation more efficient. This - /// constructor also autoinserts at the end of the specified BasicBlock. + /// Create a new switch instruction, specifying a value to switch on and a + /// default destination. The number of additional cases can be specified here + /// to make memory allocation more efficient. This constructor also + /// auto-inserts at the end of the specified BasicBlock. SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases, BasicBlock *InsertAtEnd); @@ -3127,40 +3127,40 @@ public: setOperand(1, reinterpret_cast(DefaultCase)); } - /// getNumCases - return the number of 'cases' in this switch instruction, - /// except the default case + /// Return the number of 'cases' in this switch instruction, excluding the + /// default case. unsigned getNumCases() const { return getNumOperands()/2 - 1; } - /// Returns a read/write iterator that points to the first - /// case in SwitchInst. + /// Returns a read/write iterator that points to the first case in the + /// SwitchInst. CaseIt case_begin() { return CaseIt(this, 0); } - /// Returns a read-only iterator that points to the first - /// case in the SwitchInst. + /// Returns a read-only iterator that points to the first case in the + /// SwitchInst. ConstCaseIt case_begin() const { return ConstCaseIt(this, 0); } - /// Returns a read/write iterator that points one past the last - /// in the SwitchInst. + /// Returns a read/write iterator that points one past the last in the + /// SwitchInst. CaseIt case_end() { return CaseIt(this, getNumCases()); } - /// Returns a read-only iterator that points one past the last - /// in the SwitchInst. + /// Returns a read-only iterator that points one past the last in the + /// SwitchInst. ConstCaseIt case_end() const { return ConstCaseIt(this, getNumCases()); } - /// cases - iteration adapter for range-for loops. + /// Iteration adapter for range-for loops. iterator_range cases() { return make_range(case_begin(), case_end()); } - /// cases - iteration adapter for range-for loops. + /// Constant iteration adapter for range-for loops. iterator_range cases() const { return make_range(case_begin(), case_end()); } @@ -3177,10 +3177,10 @@ public: return ConstCaseIt(this, DefaultPseudoIndex); } - /// findCaseValue - Search all of the case values for the specified constant. - /// If it is explicitly handled, return the case iterator of it, otherwise - /// return default case iterator to indicate - /// that it is handled by the default handler. + /// Search all of the case values for the specified constant. If it is + /// explicitly handled, return the case iterator of it, otherwise return + /// default case iterator to indicate that it is handled by the default + /// handler. CaseIt findCaseValue(const ConstantInt *C) { for (CaseIt i = case_begin(), e = case_end(); i != e; ++i) if (i.getCaseValue() == C) @@ -3194,8 +3194,8 @@ public: return case_default(); } - /// findCaseDest - Finds the unique case value for a given successor. Returns - /// null if the successor is not found, not unique, or is the default case. + /// Finds the unique case value for a given successor. Returns null if the + /// successor is not found, not unique, or is the default case. ConstantInt *findCaseDest(BasicBlock *BB) { if (BB == getDefaultDest()) return nullptr; @@ -3209,15 +3209,15 @@ public: return CI; } - /// addCase - Add an entry to the switch instruction... + /// 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. + /// 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. /// Note: /// This action invalidates iterators for all cases following the one removed, /// including the case_end() iterator. -- 2.11.0