Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See:...
authorSylvestre Ledru <sylvestre@debian.org>
Thu, 27 Sep 2012 10:14:43 +0000 (10:14 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Thu, 27 Sep 2012 10:14:43 +0000 (10:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8

84 files changed:
autoconf/m4/libtool.m4
include/llvm/ADT/APFloat.h
include/llvm/ADT/SetVector.h
include/llvm/ADT/SparseBitVector.h
include/llvm/Analysis/Dominators.h
include/llvm/Analysis/LibCallSemantics.h
include/llvm/Analysis/ScalarEvolution.h
include/llvm/Analysis/ScalarEvolutionExpressions.h
include/llvm/Bitcode/Archive.h
include/llvm/CodeGen/FunctionLoweringInfo.h
include/llvm/CodeGen/ISDOpcodes.h
include/llvm/CodeGen/MachineBranchProbabilityInfo.h
include/llvm/CodeGen/SelectionDAG.h
include/llvm/Constants.h
include/llvm/InstrTypes.h
include/llvm/PassAnalysisSupport.h
include/llvm/Support/PathV1.h
include/llvm/Support/TimeValue.h
include/llvm/Type.h
include/llvm/ValueSymbolTable.h
lib/Analysis/InstructionSimplify.cpp
lib/Analysis/Interval.cpp
lib/Analysis/LazyValueInfo.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Analysis/ValueTracking.cpp
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/MC/WinCOFFObjectWriter.cpp
lib/Support/APInt.cpp
lib/Support/Statistic.cpp
lib/Target/ARM/ARMFastISel.cpp
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrThumb.td
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/X86/X86FloatingPoint.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86InstrInfo.cpp
lib/Target/XCore/XCoreISelLowering.cpp
lib/Transforms/IPO/ConstantMerge.cpp
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/IPO/PruneEH.cpp
lib/Transforms/InstCombine/InstCombineAddSub.cpp
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
lib/Transforms/InstCombine/InstCombineCasts.cpp
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
lib/Transforms/InstCombine/InstCombineShifts.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Instrumentation/PathProfiling.cpp
lib/Transforms/Utils/AddrModeMatcher.cpp
lib/Transforms/Utils/BreakCriticalEdges.cpp
lib/Transforms/Vectorize/BBVectorize.cpp
lib/VMCore/Dominators.cpp
lib/VMCore/Pass.cpp
lib/VMCore/PassManager.cpp
lib/VMCore/Type.cpp
projects/sample/autoconf/m4/libtool.m4
test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll
test/Transforms/InstCombine/add.ll
test/Transforms/InstCombine/apint-xor1.ll
test/Transforms/InstCombine/apint-xor2.ll
tools/bugpoint/CrashDebugger.cpp
utils/DSAextract.py
utils/TableGen/CodeGenRegisters.cpp
utils/TableGen/CodeGenRegisters.h
utils/unittest/googletest/gtest-death-test.cc
utils/unittest/googletest/gtest-port.cc
utils/unittest/googletest/gtest.cc
utils/unittest/googletest/include/gtest/gtest-test-part.h
utils/unittest/googletest/include/gtest/gtest.h
utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
utils/unittest/googletest/include/gtest/internal/gtest-filepath.h
utils/unittest/googletest/include/gtest/internal/gtest-internal-inl.h
utils/unittest/googletest/include/gtest/internal/gtest-internal.h
utils/unittest/googletest/include/gtest/internal/gtest-port.h
utils/unittest/googletest/include/gtest/internal/gtest-string.h
utils/unittest/googletest/include/gtest/internal/gtest-tuple.h
utils/unittest/googletest/include/gtest/internal/gtest-type-util.h

index f58817e0ef2559342aedb4926ea49f3c87b8f269..05af7a2ee3fec517a61b7e6cb58f67354e06c489 100644 (file)
@@ -6082,7 +6082,7 @@ _LT_EOF
       *)
        # The compiler driver will combine linker options so we
        # cannot just pass the convience library names through
-       # without $wl, if we do not link with $LD.
+       # without $wl, iff we do not link with $LD.
        # Luckily, gcc supports the same syntax we need for Sun Studio.
        # Supported since Solaris 2.6 (maybe 2.5.1?)
        case $wlarc in
index ea15fd6e29156203a631635ac34508fcc6bd527f..5a625a4c832f78fcbc0ded400e426bf4eecb7cdc 100644 (file)
@@ -200,7 +200,7 @@ namespace llvm {
 
     /// getNaN - Factory for QNaN values.
     ///
-    /// \param Negative - True if the NaN generated should be negative.
+    /// \param Negative - True iff the NaN generated should be negative.
     /// \param type - The unspecified fill bits for creating the NaN, 0 by
     /// default.  The value is truncated as necessary.
     static APFloat getNaN(const fltSemantics &Sem, bool Negative = false,
@@ -230,20 +230,20 @@ namespace llvm {
     /// getLargest - Returns the largest finite number in the given
     /// semantics.
     ///
-    /// \param Negative - True if the number should be negative
+    /// \param Negative - True iff the number should be negative
     static APFloat getLargest(const fltSemantics &Sem, bool Negative = false);
 
     /// getSmallest - Returns the smallest (by magnitude) finite number
     /// in the given semantics.  Might be denormalized, which implies a
     /// relative loss of precision.
     ///
-    /// \param Negative - True if the number should be negative
+    /// \param Negative - True iff the number should be negative
     static APFloat getSmallest(const fltSemantics &Sem, bool Negative = false);
 
     /// getSmallestNormalized - Returns the smallest (by magnitude)
     /// normalized finite number in the given semantics.
     ///
-    /// \param Negative - True if the number should be negative
+    /// \param Negative - True iff the number should be negative
     static APFloat getSmallestNormalized(const fltSemantics &Sem,
                                          bool Negative = false);
 
index dcd88376b08395d1fbc6c60a076d4cbcbbf87e26..965f0deacaa249475f6dedf45d5d379b052ca737 100644 (file)
@@ -96,7 +96,7 @@ public:
     return vector_[n];
   }
 
-  /// @returns true if the element was inserted into the SetVector.
+  /// @returns true iff the element was inserted into the SetVector.
   /// @brief Insert a new element into the SetVector.
   bool insert(const value_type &X) {
     bool result = set_.insert(X);
index 66a561323778fb898fe2da81f4ed0e741d233528..791f1082c289fb5563237be8f9d0c500b721a1a8 100644 (file)
@@ -763,7 +763,7 @@ public:
     return false;
   }
 
-  // Return true if all bits set in this SparseBitVector are
+  // Return true iff all bits set in this SparseBitVector are
   // also set in RHS.
   bool contains(const SparseBitVector<ElementSize> &RHS) const {
     SparseBitVector<ElementSize> Result(*this);
index 22bbc2aefdca3120ddeadb2de8e833e7facb9829..a1cc196eae30ed55a0e5fff76b2f533e7c24c0b2 100644 (file)
@@ -346,7 +346,7 @@ public:
   DomTreeNodeBase<NodeT> *getRootNode() { return RootNode; }
   const DomTreeNodeBase<NodeT> *getRootNode() const { return RootNode; }
 
-  /// properlyDominates - Returns true if this dominates N and this != N.
+  /// properlyDominates - Returns true iff this dominates N and this != N.
   /// Note that this is not a constant time operation!
   ///
   bool properlyDominates(const DomTreeNodeBase<NodeT> *A,
@@ -372,7 +372,7 @@ public:
     return A;
   }
 
-  /// dominates - Returns true if A dominates B.  Note that this is not a
+  /// dominates - Returns true iff A dominates B.  Note that this is not a
   /// constant time operation!
   ///
   inline bool dominates(const DomTreeNodeBase<NodeT> *A,
index 670306872df3a2313f63b1cad23a5ff5b13d3538..f5a9e96cbdd0d5830b48e7efef3c5d6f82a90769 100644 (file)
@@ -31,7 +31,7 @@ namespace llvm {
   /// pointer is the result of a call to "__error()".
   ///
   /// Locations can also be defined in a constant-sensitive way.  For example,
-  /// it is possible to define a location that returns true if it is passed
+  /// it is possible to define a location that returns true iff it is passed
   /// into the call as a specific argument.  This is useful for modeling things
   /// like "printf", which can store to memory, but only through pointers passed
   /// with a '%n' constraint.
index 2e7d9ba8570759f6ce1b6a89567fcddd6b1adc58..c8c249a1b16c88a4761cdf356aee0cb4394e887d 100644 (file)
@@ -831,7 +831,7 @@ namespace llvm {
                           const SCEV *LHS, const SCEV *RHS);
 
     /// SimplifyICmpOperands - Simplify LHS and RHS in a comparison with
-    /// predicate Pred. Return true if any changes were made. If the
+    /// predicate Pred. Return true iff any changes were made. If the
     /// operands are provably equal or inequal, LHS and RHS are set to
     /// the same value and Pred is set to either ICMP_EQ or ICMP_NE.
     ///
index 5e06c0a43bd1d7dc5964b1918837df29b325d502..ded12974face51d176ea2b7fe5755094149c205d 100644 (file)
@@ -318,7 +318,7 @@ namespace llvm {
     /// an expressions A+B*x where A and B are loop invariant values.
     bool isAffine() const {
       // We know that the start value is invariant.  This expression is thus
-      // affine if the step is also invariant.
+      // affine iff the step is also invariant.
       return getNumOperands() == 2;
     }
 
index 892bfe83142c1ac8db026142137c84f5b839a53d..4fd4b5d90a9e5840bd9dbd8c2b8da419ecf30c11 100644 (file)
@@ -108,27 +108,27 @@ class ArchiveMember : public ilist_node<ArchiveMember> {
     /// @brief Get the data content of the archive member
     const char* getData() const { return data; }
 
-    /// @returns true if the member is a SVR4 (non-LLVM) symbol table
+    /// @returns true iff the member is a SVR4 (non-LLVM) symbol table
     /// @brief Determine if this member is a SVR4 symbol table.
     bool isSVR4SymbolTable() const { return flags&SVR4SymbolTableFlag; }
 
-    /// @returns true if the member is a BSD4.4 (non-LLVM) symbol table
+    /// @returns true iff the member is a BSD4.4 (non-LLVM) symbol table
     /// @brief Determine if this member is a BSD4.4 symbol table.
     bool isBSD4SymbolTable() const { return flags&BSD4SymbolTableFlag; }
 
-    /// @returns true if the archive member is the LLVM symbol table
+    /// @returns true iff the archive member is the LLVM symbol table
     /// @brief Determine if this member is the LLVM symbol table.
     bool isLLVMSymbolTable() const { return flags&LLVMSymbolTableFlag; }
 
-    /// @returns true if the archive member is the ar(1) string table
+    /// @returns true iff the archive member is the ar(1) string table
     /// @brief Determine if this member is the ar(1) string table.
     bool isStringTable() const { return flags&StringTableFlag; }
 
-    /// @returns true if the archive member is a bitcode file.
+    /// @returns true iff the archive member is a bitcode file.
     /// @brief Determine if this member is a bitcode file.
     bool isBitcode() const { return flags&BitcodeFlag; }
 
-    /// @returns true if the file name contains a path (directory) component.
+    /// @returns true iff the file name contains a path (directory) component.
     /// @brief Determine if the member has a path
     bool hasPath() const { return flags&HasPathFlag; }
 
@@ -137,7 +137,7 @@ class ArchiveMember : public ilist_node<ArchiveMember> {
     /// separator character (/). To avoid this, a "long format" member name is
     /// allowed that doesn't have this restriction. This method determines if
     /// that "long format" is used for this member.
-    /// @returns true if the file name uses the long form
+    /// @returns true iff the file name uses the long form
     /// @brief Determine if the member has a long file name
     bool hasLongFilename() const { return flags&HasLongFilenameFlag; }
 
index 794a95a03b6bc477c6de4e21ca8a401f7da89add..8cf22eca4fa6ee9e9e6dd28f7c3bdc2cb6bda996 100644 (file)
@@ -58,7 +58,7 @@ public:
   MachineFunction *MF;
   MachineRegisterInfo *RegInfo;
   BranchProbabilityInfo *BPI;
-  /// CanLowerReturn - true if the function's return value can be lowered to
+  /// CanLowerReturn - true iff the function's return value can be lowered to
   /// registers.
   bool CanLowerReturn;
 
index ddf1b7d17d7e546cc0b3cbbbc1b8618ffb9ddd7d..5d0a3b4c7067b49191a0fb5989f84e4e5ad55b94 100644 (file)
@@ -340,7 +340,7 @@ namespace ISD {
     /// condition code in op #4, a CondCodeSDNode.
     SELECT_CC,
 
-    /// SetCC operator - This evaluates to a true value if the condition is
+    /// SetCC operator - This evaluates to a true value iff the condition is
     /// true.  If the result value type is not i1 then the high bits conform
     /// to getBooleanContents.  The operands to this are the left and right
     /// operands to compare (ops #0, and #1) and the condition code to compare
index 87f595adfa91f9a06e19777e5b4576db2a977ae7..12189ceb7f1684ea73e1e452debee499fd4290ae 100644 (file)
@@ -69,7 +69,7 @@ public:
 
   // Return a probability as a fraction between 0 (0% probability) and
   // 1 (100% probability), however the value is never equal to 0, and can be 1
-  // only if SRC block has only one successor.
+  // only iff SRC block has only one successor.
   // NB: This routine's complexity is linear on the number of successors of
   // Src. Querying sequentially for each successor's probability is a quadratic
   // query pattern.
@@ -77,7 +77,7 @@ public:
                                        MachineBasicBlock *Dst) const;
 
   // Print value between 0 (0% probability) and 1 (100% probability),
-  // however the value is never equal to 0, and can be 1 only if SRC block
+  // however the value is never equal to 0, and can be 1 only iff SRC block
   // has only one successor.
   raw_ostream &printEdgeProbability(raw_ostream &OS, MachineBasicBlock *Src,
                                     MachineBasicBlock *Dst) const;
index a8f5f5fa09ef0702e1ebacd611875e9961298982..619ee699430d3426b6f6f17d8323936e4e8b2739 100644 (file)
@@ -1021,7 +1021,7 @@ public:
   /// ISD::ADD with a ConstantSDNode on the right-hand side, or if it is an
   /// ISD::OR with a ConstantSDNode that is guaranteed to have the same
   /// semantics as an ADD.  This handles the equivalence:
-  ///     X|Cst == X+Cst if X&Cst = 0.
+  ///     X|Cst == X+Cst iff X&Cst = 0.
   bool isBaseWithConstantOffset(SDValue Op) const;
 
   /// isKnownNeverNan - Test whether the given SDValue is known to never be NaN.
index 097b0f52ec474750c3d4b6cc24e7af0b69c39518..85fed4259d303dbcf187869254a51e05fda20b30 100644 (file)
@@ -170,17 +170,17 @@ public:
     return Val == 1;
   }
 
-  /// This function will return true if every bit in this constant is set
+  /// This function will return true iff every bit in this constant is set
   /// to true.
-  /// @returns true if this constant's bits are all set to true.
+  /// @returns true iff this constant's bits are all set to true.
   /// @brief Determine if the value is all ones.
   bool isMinusOne() const { 
     return Val.isAllOnesValue();
   }
 
-  /// This function will return true if this constant represents the largest
+  /// This function will return true iff this constant represents the largest
   /// value that may be represented by the constant's type.
-  /// @returns true if this is the largest value that may be represented 
+  /// @returns true iff this is the largest value that may be represented 
   /// by this type.
   /// @brief Determine if the value is maximal.
   bool isMaxValue(bool isSigned) const {
@@ -190,7 +190,7 @@ public:
       return Val.isMaxValue();
   }
 
-  /// This function will return true if this constant represents the smallest
+  /// This function will return true iff this constant represents the smallest
   /// value that may be represented by this constant's type.
   /// @returns true if this is the smallest value that may be represented by 
   /// this type.
@@ -202,10 +202,10 @@ public:
       return Val.isMinValue();
   }
 
-  /// This function will return true if this constant represents a value with
+  /// This function will return true iff this constant represents a value with
   /// active bits bigger than 64 bits or a value greater than the given uint64_t
   /// value.
-  /// @returns true if this constant is greater or equal to the given number.
+  /// @returns true iff this constant is greater or equal to the given number.
   /// @brief Determine if the value is greater or equal to the given number.
   bool uge(uint64_t Num) const {
     return Val.getActiveBits() > 64 || Val.getZExtValue() >= Num;
index 3daca3347e15ae8255974451b128b99ec18c5dd4..e957d759e7afbcd536f5b70da3abcbfaee388b19 100644 (file)
@@ -547,14 +547,14 @@ public:
   /// There are several places where we need to know if a cast instruction
   /// only deals with integer source and destination types. To simplify that
   /// logic, this method is provided.
-  /// @returns true if the cast has only integral typed operand and dest type.
+  /// @returns true iff the cast has only integral typed operand and dest type.
   /// @brief Determine if this is an integer-only cast.
   bool isIntegerCast() const;
 
   /// A lossless cast is one that does not alter the basic value. It implies
   /// a no-op cast but is more stringent, preventing things like int->float,
   /// long->double, or int->ptr.
-  /// @returns true if the cast is lossless.
+  /// @returns true iff the cast is lossless.
   /// @brief Determine if this is a lossless cast.
   bool isLosslessCast() const;
 
@@ -606,7 +606,7 @@ public:
 
   /// This method can be used to determine if a cast from S to DstTy using
   /// Opcode op is valid or not.
-  /// @returns true if the proposed cast is valid.
+  /// @returns true iff the proposed cast is valid.
   /// @brief Determine if a cast is valid without creating one.
   static bool castIsValid(Instruction::CastOps op, Value *S, Type *DstTy);
 
index c11ca0bbdedcb619b788eb17c51dbae93a18270e..d14d73b1b14f37488920f0a60ba2447e0fdacb48 100644 (file)
@@ -94,7 +94,7 @@ public:
   void setPreservesAll() { PreservesAll = true; }
   bool getPreservesAll() const { return PreservesAll; }
 
-  /// setPreservesCFG - This function should be called by the pass, if they do
+  /// setPreservesCFG - This function should be called by the pass, iff they do
   /// not:
   ///
   ///  1. Add or remove basic blocks from the function
index 1451f7dc8a3842f714daf19344780e26aa46ba69..643ee8c6c1d0aa8b83775cfeaad2d462a020a3be 100644 (file)
@@ -232,7 +232,7 @@ namespace sys {
       /// determine if the current value of \p this is a syntactically valid
       /// path name for the operating system. The path name does not need to
       /// exist, validity is simply syntactical. Empty paths are always invalid.
-      /// @returns true if the path name is syntactically legal for the
+      /// @returns true iff the path name is syntactically legal for the
       /// host operating system.
       /// @brief Determine if a path is syntactically valid or not.
       bool isValid() const;
@@ -242,7 +242,7 @@ namespace sys {
       /// if the file is empty. To get the length of the file itself, Use the
       /// PathWithStatus::getFileStatus() method and then the getSize() method
       /// on the returned FileStatus object.
-      /// @returns true if the path is empty.
+      /// @returns true iff the path is empty.
       /// @brief Determines if the path name is empty (invalid).
       bool isEmpty() const { return path.empty(); }
 
index e003297b71ac960f6fd95280507c1f0198ac84fc..e780b50c60396e335b0cf455432119caffd2fa81 100644 (file)
@@ -130,12 +130,12 @@ namespace sys {
     }
 
     /// Determine if \p this is less than \p that.
-    /// @returns True if *this < that.
+    /// @returns True iff *this < that.
     /// @brief True if this < that.
     int operator < (const TimeValue &that) const { return that > *this; }
 
     /// Determine if \p this is greather than \p that.
-    /// @returns True if *this > that.
+    /// @returns True iff *this > that.
     /// @brief True if this > that.
     int operator > (const TimeValue &that) const {
       if ( this->seconds_ > that.seconds_ ) {
@@ -147,12 +147,12 @@ namespace sys {
     }
 
     /// Determine if \p this is less than or equal to \p that.
-    /// @returns True if *this <= that.
+    /// @returns True iff *this <= that.
     /// @brief True if this <= that.
     int operator <= (const TimeValue &that) const { return that >= *this; }
 
     /// Determine if \p this is greater than or equal to \p that.
-    /// @returns True if *this >= that.
+    /// @returns True iff *this >= that.
     int operator >= (const TimeValue &that) const {
       if ( this->seconds_ > that.seconds_ ) {
           return 1;
@@ -163,7 +163,7 @@ namespace sys {
     }
 
     /// Determines if two TimeValue objects represent the same moment in time.
-    /// @returns True if *this == that.
+    /// @returns True iff *this == that.
     int operator == (const TimeValue &that) const {
       return (this->seconds_ == that.seconds_) &&
              (this->nanos_ == that.nanos_);
@@ -171,7 +171,7 @@ namespace sys {
 
     /// Determines if two TimeValue objects represent times that are not the
     /// same.
-    /// @returns True if *this != that.
+    /// @returns True iff *this != that.
     int operator != (const TimeValue &that) const { return !(*this == that); }
 
     /// Adds two TimeValue objects together.
index 4f08c4bbcd7d2337537476c9e7682bb62d23ff46..185258d8ff2afcd27d0b1d690d2d5f3fb4d7c6e0 100644 (file)
@@ -398,7 +398,7 @@ public:
 
 private:
   /// isSizedDerivedType - Derived types like structures and arrays are sized
-  /// if all of the members of the type are sized as well.  Since asking for
+  /// iff all of the members of the type are sized as well.  Since asking for
   /// their size is relatively uncommon, move this operation out of line.
   bool isSizedDerivedType() const;
 };
index 4a9af623722143b4aa07082d0b54e9d23267eaa8..1738cc4a7a793e2e7e8c462c710a8deece4a954b 100644 (file)
@@ -70,7 +70,7 @@ public:
   /// @brief Lookup a named Value.
   Value *lookup(StringRef Name) const { return vmap.lookup(Name); }
 
-  /// @returns true if the symbol table is empty
+  /// @returns true iff the symbol table is empty
   /// @brief Determine if the symbol table is empty
   inline bool empty() const { return vmap.empty(); }
 
index 07b685082fcdb198cac376262d0dc0a16273f455..379a35ad379d0c9dfd5759882b33dfed3ec9a4a9 100644 (file)
@@ -2004,7 +2004,7 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
           // LHS >u RHS.
           case ICmpInst::ICMP_UGT:
           case ICmpInst::ICMP_UGE:
-            // Comparison is true if the LHS <s 0.
+            // Comparison is true iff the LHS <s 0.
             if (MaxRecurse)
               if (Value *V = SimplifyICmpInst(ICmpInst::ICMP_SLT, SrcOp,
                                               Constant::getNullValue(SrcTy),
@@ -2013,7 +2013,7 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
             break;
           case ICmpInst::ICMP_ULT:
           case ICmpInst::ICMP_ULE:
-            // Comparison is true if the LHS >=s 0.
+            // Comparison is true iff the LHS >=s 0.
             if (MaxRecurse)
               if (Value *V = SimplifyICmpInst(ICmpInst::ICMP_SGE, SrcOp,
                                               Constant::getNullValue(SrcTy),
@@ -2171,31 +2171,31 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
   // Simplify comparisons involving max/min.
   Value *A, *B;
   CmpInst::Predicate P = CmpInst::BAD_ICMP_PREDICATE;
-  CmpInst::Predicate EqP; // Chosen so that "A == max/min(A,B)" if "A EqP B".
+  CmpInst::Predicate EqP; // Chosen so that "A == max/min(A,B)" iff "A EqP B".
 
   // Signed variants on "max(a,b)>=a -> true".
   if (match(LHS, m_SMax(m_Value(A), m_Value(B))) && (A == RHS || B == RHS)) {
     if (A != RHS) std::swap(A, B); // smax(A, B) pred A.
-    EqP = CmpInst::ICMP_SGE; // "A == smax(A, B)" if "A sge B".
+    EqP = CmpInst::ICMP_SGE; // "A == smax(A, B)" iff "A sge B".
     // We analyze this as smax(A, B) pred A.
     P = Pred;
   } else if (match(RHS, m_SMax(m_Value(A), m_Value(B))) &&
              (A == LHS || B == LHS)) {
     if (A != LHS) std::swap(A, B); // A pred smax(A, B).
-    EqP = CmpInst::ICMP_SGE; // "A == smax(A, B)" if "A sge B".
+    EqP = CmpInst::ICMP_SGE; // "A == smax(A, B)" iff "A sge B".
     // We analyze this as smax(A, B) swapped-pred A.
     P = CmpInst::getSwappedPredicate(Pred);
   } else if (match(LHS, m_SMin(m_Value(A), m_Value(B))) &&
              (A == RHS || B == RHS)) {
     if (A != RHS) std::swap(A, B); // smin(A, B) pred A.
-    EqP = CmpInst::ICMP_SLE; // "A == smin(A, B)" if "A sle B".
+    EqP = CmpInst::ICMP_SLE; // "A == smin(A, B)" iff "A sle B".
     // We analyze this as smax(-A, -B) swapped-pred -A.
     // Note that we do not need to actually form -A or -B thanks to EqP.
     P = CmpInst::getSwappedPredicate(Pred);
   } else if (match(RHS, m_SMin(m_Value(A), m_Value(B))) &&
              (A == LHS || B == LHS)) {
     if (A != LHS) std::swap(A, B); // A pred smin(A, B).
-    EqP = CmpInst::ICMP_SLE; // "A == smin(A, B)" if "A sle B".
+    EqP = CmpInst::ICMP_SLE; // "A == smin(A, B)" iff "A sle B".
     // We analyze this as smax(-A, -B) pred -A.
     // Note that we do not need to actually form -A or -B thanks to EqP.
     P = Pred;
@@ -2246,26 +2246,26 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
   P = CmpInst::BAD_ICMP_PREDICATE;
   if (match(LHS, m_UMax(m_Value(A), m_Value(B))) && (A == RHS || B == RHS)) {
     if (A != RHS) std::swap(A, B); // umax(A, B) pred A.
-    EqP = CmpInst::ICMP_UGE; // "A == umax(A, B)" if "A uge B".
+    EqP = CmpInst::ICMP_UGE; // "A == umax(A, B)" iff "A uge B".
     // We analyze this as umax(A, B) pred A.
     P = Pred;
   } else if (match(RHS, m_UMax(m_Value(A), m_Value(B))) &&
              (A == LHS || B == LHS)) {
     if (A != LHS) std::swap(A, B); // A pred umax(A, B).
-    EqP = CmpInst::ICMP_UGE; // "A == umax(A, B)" if "A uge B".
+    EqP = CmpInst::ICMP_UGE; // "A == umax(A, B)" iff "A uge B".
     // We analyze this as umax(A, B) swapped-pred A.
     P = CmpInst::getSwappedPredicate(Pred);
   } else if (match(LHS, m_UMin(m_Value(A), m_Value(B))) &&
              (A == RHS || B == RHS)) {
     if (A != RHS) std::swap(A, B); // umin(A, B) pred A.
-    EqP = CmpInst::ICMP_ULE; // "A == umin(A, B)" if "A ule B".
+    EqP = CmpInst::ICMP_ULE; // "A == umin(A, B)" iff "A ule B".
     // We analyze this as umax(-A, -B) swapped-pred -A.
     // Note that we do not need to actually form -A or -B thanks to EqP.
     P = CmpInst::getSwappedPredicate(Pred);
   } else if (match(RHS, m_UMin(m_Value(A), m_Value(B))) &&
              (A == LHS || B == LHS)) {
     if (A != LHS) std::swap(A, B); // A pred umin(A, B).
-    EqP = CmpInst::ICMP_ULE; // "A == umin(A, B)" if "A ule B".
+    EqP = CmpInst::ICMP_ULE; // "A == umin(A, B)" iff "A ule B".
     // We analyze this as umax(-A, -B) pred -A.
     // Note that we do not need to actually form -A or -B thanks to EqP.
     P = Pred;
index 125d42e2dca59a7aae897245aca9c2d2decead7a..ca9cdcaf246484c302d6b53345426b88c152771d 100644 (file)
@@ -27,7 +27,7 @@ using namespace llvm;
 // isLoop - Find out if there is a back edge in this interval...
 //
 bool Interval::isLoop() const {
-  // There is a loop in this interval if one of the predecessors of the header
+  // There is a loop in this interval iff one of the predecessors of the header
   // node lives in the interval.
   for (::pred_iterator I = ::pred_begin(HeaderNode), E = ::pred_end(HeaderNode);
        I != E; ++I)
index d6dd627ba3065611517fd02bca9a629611b35257..ec618fad22ed690e6dc6983ea13cc2b43da6e0de 100644 (file)
@@ -1109,14 +1109,14 @@ LazyValueInfo::getPredicateOnEdge(unsigned Pred, Value *V, Constant *C,
     // If this is an equality comparison, we can try to fold it knowing that
     // "V != C1".
     if (Pred == ICmpInst::ICMP_EQ) {
-      // !C1 == C -> false if C1 == C.
+      // !C1 == C -> false iff C1 == C.
       Res = ConstantFoldCompareInstOperands(ICmpInst::ICMP_NE,
                                             Result.getNotConstant(), C, TD,
                                             TLI);
       if (Res->isNullValue())
         return False;
     } else if (Pred == ICmpInst::ICMP_NE) {
-      // !C1 != C -> true if C1 == C.
+      // !C1 != C -> true iff C1 == C.
       Res = ConstantFoldCompareInstOperands(ICmpInst::ICMP_NE,
                                             Result.getNotConstant(), C, TD,
                                             TLI);
index fe5860e6c3c09b80a4e6edb24236022ab9e2ce76..9b9c889496a8a0caf818f4b9e1195b35b098ad30 100644 (file)
@@ -1367,7 +1367,7 @@ const SCEV *ScalarEvolution::getAnyExtendExpr(const SCEV *Op,
 /// This form often exposes folding opportunities that are hidden in
 /// the original operand list.
 ///
-/// Return true if it appears that any interesting folding opportunities
+/// Return true iff it appears that any interesting folding opportunities
 /// may be exposed. This helps getAddRecExpr short-circuit extra work in
 /// the common case where no interesting opportunities are present, and
 /// is also used as a check to avoid infinite recursion.
@@ -5598,7 +5598,7 @@ static bool HasSameValue(const SCEV *A, const SCEV *B) {
 }
 
 /// SimplifyICmpOperands - Simplify LHS and RHS in a comparison with
-/// predicate Pred. Return true if any changes were made.
+/// predicate Pred. Return true iff any changes were made.
 ///
 bool ScalarEvolution::SimplifyICmpOperands(ICmpInst::Predicate &Pred,
                                            const SCEV *&LHS, const SCEV *&RHS,
index 19fde0e419b7f6e248782f02f39890a539222bea..491224a4b692cf0dbf18a87263bb991f135d998b 100644 (file)
@@ -470,7 +470,7 @@ void llvm::ComputeMaskedBits(Value *V, APInt &KnownZero, APInt &KnownOne,
     return;
   }
   case Instruction::Shl:
-    // (shl X, C1) & C2 == 0   if   (X & C2 >>u C1) == 0
+    // (shl X, C1) & C2 == 0   iff   (X & C2 >>u C1) == 0
     if (ConstantInt *SA = dyn_cast<ConstantInt>(I->getOperand(1))) {
       uint64_t ShiftAmt = SA->getLimitedValue(BitWidth);
       ComputeMaskedBits(I->getOperand(0), KnownZero, KnownOne, TD, Depth+1);
@@ -482,7 +482,7 @@ void llvm::ComputeMaskedBits(Value *V, APInt &KnownZero, APInt &KnownOne,
     }
     break;
   case Instruction::LShr:
-    // (ushr X, C1) & C2 == 0   if  (-1 >> C1) & C2 == 0
+    // (ushr X, C1) & C2 == 0   iff  (-1 >> C1) & C2 == 0
     if (ConstantInt *SA = dyn_cast<ConstantInt>(I->getOperand(1))) {
       // Compute the new bits that are at the top now.
       uint64_t ShiftAmt = SA->getLimitedValue(BitWidth);
@@ -498,7 +498,7 @@ void llvm::ComputeMaskedBits(Value *V, APInt &KnownZero, APInt &KnownOne,
     }
     break;
   case Instruction::AShr:
-    // (ashr X, C1) & C2 == 0   if  (-1 >> C1) & C2 == 0
+    // (ashr X, C1) & C2 == 0   iff  (-1 >> C1) & C2 == 0
     if (ConstantInt *SA = dyn_cast<ConstantInt>(I->getOperand(1))) {
       // Compute the new bits that are at the top now.
       uint64_t ShiftAmt = SA->getLimitedValue(BitWidth-1);
index 2598f4b81ebc0384b88655ef3726570bec510167..2931d2de97bd7298da3d85ffac934ff77fea2dc1 100644 (file)
@@ -578,7 +578,7 @@ SDValue DAGCombiner::ReassociateOps(unsigned Opc, DebugLoc DL,
       return DAG.getNode(Opc, DL, VT, N0.getOperand(0), OpNode);
     }
     if (N0.hasOneUse()) {
-      // reassoc. (op (op x, c1), y) -> (op (op x, y), c1) if x+c1 has one use
+      // reassoc. (op (op x, c1), y) -> (op (op x, y), c1) iff x+c1 has one use
       SDValue OpNode = DAG.getNode(Opc, N0.getDebugLoc(), VT,
                                    N0.getOperand(0), N1);
       AddToWorkList(OpNode.getNode());
@@ -596,7 +596,7 @@ SDValue DAGCombiner::ReassociateOps(unsigned Opc, DebugLoc DL,
       return DAG.getNode(Opc, DL, VT, N1.getOperand(0), OpNode);
     }
     if (N1.hasOneUse()) {
-      // reassoc. (op y, (op x, c1)) -> (op (op x, y), c1) if x+c1 has one use
+      // reassoc. (op y, (op x, c1)) -> (op (op x, y), c1) iff x+c1 has one use
       SDValue OpNode = DAG.getNode(Opc, N0.getDebugLoc(), VT,
                                    N1.getOperand(0), N0);
       AddToWorkList(OpNode.getNode());
@@ -1455,7 +1455,7 @@ SDValue DAGCombiner::visitADD(SDNode *N) {
   if (!VT.isVector() && SimplifyDemandedBits(SDValue(N, 0)))
     return SDValue(N, 0);
 
-  // fold (a+b) -> (a|b) if a and b share no bits.
+  // fold (a+b) -> (a|b) iff a and b share no bits.
   if (VT.isInteger() && !VT.isVector()) {
     APInt LHSZero, LHSOne;
     APInt RHSZero, RHSOne;
@@ -1549,7 +1549,7 @@ SDValue DAGCombiner::visitADDC(SDNode *N) {
     return CombineTo(N, N0, DAG.getNode(ISD::CARRY_FALSE,
                                         N->getDebugLoc(), MVT::Glue));
 
-  // fold (addc a, b) -> (or a, b), CARRY_FALSE if a and b share no bits.
+  // fold (addc a, b) -> (or a, b), CARRY_FALSE iff a and b share no bits.
   APInt LHSZero, LHSOne;
   APInt RHSZero, RHSOne;
   DAG.ComputeMaskedBits(N0, LHSZero, LHSOne);
@@ -1937,7 +1937,7 @@ SDValue DAGCombiner::visitUDIV(SDNode *N) {
     return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0,
                        DAG.getConstant(N1C->getAPIntValue().logBase2(),
                                        getShiftAmountTy(N0.getValueType())));
-  // fold (udiv x, (shl c, y)) -> x >>u (log2(c)+y) if c is power of 2
+  // fold (udiv x, (shl c, y)) -> x >>u (log2(c)+y) iff c is power of 2
   if (N1.getOpcode() == ISD::SHL) {
     if (ConstantSDNode *SHC = dyn_cast<ConstantSDNode>(N1.getOperand(0))) {
       if (SHC->getAPIntValue().isPowerOf2()) {
@@ -2642,7 +2642,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
       return SDValue(N, 0);   // Return N so it doesn't get rechecked!
     }
   }
-  // fold (zext_inreg (sextload x)) -> (zextload x) if load has one use
+  // fold (zext_inreg (sextload x)) -> (zextload x) iff load has one use
   if (ISD::isSEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) &&
       N0.hasOneUse()) {
     LoadSDNode *LN0 = cast<LoadSDNode>(N0);
@@ -3038,7 +3038,7 @@ SDValue DAGCombiner::visitOR(SDNode *N) {
   // fold (or x, -1) -> -1
   if (N1C && N1C->isAllOnesValue())
     return N1;
-  // fold (or x, c) -> c if (x & ~c) == 0
+  // fold (or x, c) -> c iff (x & ~c) == 0
   if (N1C && DAG.MaskedValueIsZero(N0, ~N1C->getAPIntValue()))
     return N1;
 
@@ -3055,7 +3055,7 @@ SDValue DAGCombiner::visitOR(SDNode *N) {
   if (ROR.getNode() != 0)
     return ROR;
   // Canonicalize (or (and X, c1), c2) -> (and (or X, c2), c1|c2)
-  // if (c1 & c2) == 0.
+  // iff (c1 & c2) == 0.
   if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() &&
              isa<ConstantSDNode>(N0.getOperand(1))) {
     ConstantSDNode *C1 = cast<ConstantSDNode>(N0.getOperand(1));
@@ -3392,7 +3392,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
     return DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), VT, V);
   }
 
-  // fold (not (or x, y)) -> (and (not x), (not y)) if x or y are setcc
+  // fold (not (or x, y)) -> (and (not x), (not y)) iff x or y are setcc
   if (N1C && N1C->getAPIntValue() == 1 && VT == MVT::i1 &&
       (N0.getOpcode() == ISD::OR || N0.getOpcode() == ISD::AND)) {
     SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1);
@@ -3404,7 +3404,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
       return DAG.getNode(NewOpcode, N->getDebugLoc(), VT, LHS, RHS);
     }
   }
-  // fold (not (or x, y)) -> (and (not x), (not y)) if x or y are constants
+  // fold (not (or x, y)) -> (and (not x), (not y)) iff x or y are constants
   if (N1C && N1C->isAllOnesValue() &&
       (N0.getOpcode() == ISD::OR || N0.getOpcode() == ISD::AND)) {
     SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1);
@@ -3882,7 +3882,7 @@ SDValue DAGCombiner::visitSRL(SDNode *N) {
       return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0.getOperand(0), N1);
   }
 
-  // fold (srl (ctlz x), "5") -> x  if x has one bit set (the low bit).
+  // fold (srl (ctlz x), "5") -> x  iff x has one bit set (the low bit).
   if (N1C && N0.getOpcode() == ISD::CTLZ &&
       N1C->getAPIntValue() == Log2_32(VT.getSizeInBits())) {
     APInt KnownZero, KnownOne;
@@ -4816,7 +4816,7 @@ SDValue DAGCombiner::visitANY_EXTEND(SDNode *N) {
   if (N0.getOpcode() == ISD::TRUNCATE) {
     SDValue TruncOp = N0.getOperand(0);
     if (TruncOp.getValueType() == VT)
-      return TruncOp; // x if x size == zext size.
+      return TruncOp; // x iff x size == zext size.
     if (TruncOp.getValueType().bitsGT(VT))
       return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, TruncOp);
     return DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, TruncOp);
@@ -5168,12 +5168,12 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
     return NarrowLoad;
 
   // fold (sext_in_reg (srl X, 24), i8) -> (sra X, 24)
-  // fold (sext_in_reg (srl X, 23), i8) -> (sra X, 23) if possible.
+  // fold (sext_in_reg (srl X, 23), i8) -> (sra X, 23) iff possible.
   // We already fold "(sext_in_reg (srl X, 25), i8) -> srl X, 25" above.
   if (N0.getOpcode() == ISD::SRL) {
     if (ConstantSDNode *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1)))
       if (ShAmt->getZExtValue()+EVTBits <= VTBits) {
-        // We can turn this into an SRA if the input to the SRL is already sign
+        // We can turn this into an SRA iff the input to the SRL is already sign
         // extended enough.
         unsigned InSignBits = DAG.ComputeNumSignBits(N0.getOperand(0));
         if (VTBits-(ShAmt->getZExtValue()+EVTBits) < InSignBits)
@@ -5199,7 +5199,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
     CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1));
     return SDValue(N, 0);   // Return N so it doesn't get rechecked!
   }
-  // fold (sext_inreg (zextload x)) -> (sextload x) if load has one use
+  // fold (sext_inreg (zextload x)) -> (sextload x) iff load has one use
   if (ISD::isZEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) &&
       N0.hasOneUse() &&
       EVT == cast<LoadSDNode>(N0)->getMemoryVT() &&
@@ -5506,7 +5506,7 @@ SDValue DAGCombiner::visitBITCAST(SDNode *N) {
     }
   }
 
-  // bitconvert(build_pair(ld, ld)) -> ld if load locations are consecutive.
+  // bitconvert(build_pair(ld, ld)) -> ld iff load locations are consecutive.
   if (N0.getOpcode() == ISD::BUILD_PAIR) {
     SDValue CombineLD = CombineConsecutiveLoads(N0.getNode(), VT);
     if (CombineLD.getNode())
@@ -6151,8 +6151,8 @@ SDValue DAGCombiner::visitFCOPYSIGN(SDNode *N) {
 
   if (N1CFP) {
     const APFloat& V = N1CFP->getValueAPF();
-    // copysign(x, c1) -> fabs(x)       if ispos(c1)
-    // copysign(x, c1) -> fneg(fabs(x)) if isneg(c1)
+    // copysign(x, c1) -> fabs(x)       iff ispos(c1)
+    // copysign(x, c1) -> fneg(fabs(x)) iff isneg(c1)
     if (!V.isNegative()) {
       if (!LegalOperations || TLI.isOperationLegal(ISD::FABS, VT))
         return DAG.getNode(ISD::FABS, N->getDebugLoc(), VT, N0);
@@ -8764,7 +8764,7 @@ SDValue DAGCombiner::SimplifySelectCC(DebugLoc DL, SDValue N0, SDValue N1,
     EVT XType = N0.getValueType();
     EVT AType = N2.getValueType();
     if (XType.bitsGE(AType)) {
-      // and (sra X, size(X)-1, A) -> "and (srl X, C2), A" if A is a
+      // and (sra X, size(X)-1, A) -> "and (srl X, C2), A" iff A is a
       // single-bit constant.
       if (N2C && ((N2C->getAPIntValue() & (N2C->getAPIntValue()-1)) == 0)) {
         unsigned ShCtV = N2C->getAPIntValue().logBase2();
index d93b35dfb8784c4cc4cbb55d74b198971702a759..1cccf1a0574965aebec4e077165868e9b735bf51 100644 (file)
@@ -447,7 +447,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_SADDSUBO(SDNode *N, unsigned ResNo) {
   if (ResNo == 1)
     return PromoteIntRes_Overflow(N);
 
-  // The operation overflowed if the result in the larger type is not the
+  // The operation overflowed iff the result in the larger type is not the
   // sign extension of its truncation to the original type.
   SDValue LHS = SExtPromotedInteger(N->getOperand(0));
   SDValue RHS = SExtPromotedInteger(N->getOperand(1));
@@ -610,7 +610,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_UADDSUBO(SDNode *N, unsigned ResNo) {
   if (ResNo == 1)
     return PromoteIntRes_Overflow(N);
 
-  // The operation overflowed if the result in the larger type is not the
+  // The operation overflowed iff the result in the larger type is not the
   // zero extension of its truncation to the original type.
   SDValue LHS = ZExtPromotedInteger(N->getOperand(0));
   SDValue RHS = ZExtPromotedInteger(N->getOperand(1));
@@ -655,17 +655,17 @@ SDValue DAGTypeLegalizer::PromoteIntRes_XMULO(SDNode *N, unsigned ResNo) {
   }
   SDValue Mul = DAG.getNode(ISD::MUL, DL, LHS.getValueType(), LHS, RHS);
 
-  // Overflow occurred if the high part of the result does not
+  // Overflow occurred iff the high part of the result does not
   // zero/sign-extend the low part.
   SDValue Overflow;
   if (N->getOpcode() == ISD::UMULO) {
-    // Unsigned overflow occurred if the high part is non-zero.
+    // Unsigned overflow occurred iff the high part is non-zero.
     SDValue Hi = DAG.getNode(ISD::SRL, DL, Mul.getValueType(), Mul,
                              DAG.getIntPtrConstant(SmallVT.getSizeInBits()));
     Overflow = DAG.getSetCC(DL, N->getValueType(1), Hi,
                             DAG.getConstant(0, Hi.getValueType()), ISD::SETNE);
   } else {
-    // Signed overflow occurred if the high part does not sign extend the low.
+    // Signed overflow occurred iff the high part does not sign extend the low.
     SDValue SExt = DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, Mul.getValueType(),
                                Mul, DAG.getValueType(SmallVT));
     Overflow = DAG.getSetCC(DL, N->getValueType(1), SExt, Mul, ISD::SETNE);
@@ -2240,8 +2240,8 @@ void DAGTypeLegalizer::ExpandIntRes_UADDSUBO(SDNode *N,
                             LHS, RHS);
   SplitInteger(Sum, Lo, Hi);
 
-  // Calculate the overflow: addition overflows if a + b < a, and subtraction
-  // overflows if a - b > a.
+  // Calculate the overflow: addition overflows iff a + b < a, and subtraction
+  // overflows iff a - b > a.
   SDValue Ofl = DAG.getSetCC(dl, N->getValueType(1), Sum, LHS,
                              N->getOpcode () == ISD::UADDO ?
                              ISD::SETULT : ISD::SETUGT);
index 99d2aada41add25be86df67acde8b61ad1b0276d..a48a6256e5518ff9badf5bb7d044796b94191f5f 100644 (file)
@@ -1825,7 +1825,7 @@ void SelectionDAG::ComputeMaskedBits(SDValue Op, APInt &KnownZero,
       KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - 1);
     return;
   case ISD::SHL:
-    // (shl X, C1) & C2 == 0   if   (X & C2 >>u C1) == 0
+    // (shl X, C1) & C2 == 0   iff   (X & C2 >>u C1) == 0
     if (ConstantSDNode *SA = dyn_cast<ConstantSDNode>(Op.getOperand(1))) {
       unsigned ShAmt = SA->getZExtValue();
 
@@ -1842,7 +1842,7 @@ void SelectionDAG::ComputeMaskedBits(SDValue Op, APInt &KnownZero,
     }
     return;
   case ISD::SRL:
-    // (ushr X, C1) & C2 == 0   if  (-1 >> C1) & C2 == 0
+    // (ushr X, C1) & C2 == 0   iff  (-1 >> C1) & C2 == 0
     if (ConstantSDNode *SA = dyn_cast<ConstantSDNode>(Op.getOperand(1))) {
       unsigned ShAmt = SA->getZExtValue();
 
@@ -2356,7 +2356,7 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, unsigned Depth) const{
 /// ISD::ADD with a ConstantSDNode on the right-hand side, or if it is an
 /// ISD::OR with a ConstantSDNode that is guaranteed to have the same
 /// semantics as an ADD.  This handles the equivalence:
-///     X|Cst == X+Cst if X&Cst = 0.
+///     X|Cst == X+Cst iff X&Cst = 0.
 bool SelectionDAG::isBaseWithConstantOffset(SDValue Op) const {
   if ((Op.getOpcode() != ISD::ADD && Op.getOpcode() != ISD::OR) ||
       !isa<ConstantSDNode>(Op.getOperand(1)))
@@ -2882,7 +2882,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
     assert(VT.isFloatingPoint() && EVT.isFloatingPoint() &&
            "Cannot FP_ROUND_INREG integer types");
     assert(EVT.isVector() == VT.isVector() &&
-           "FP_ROUND_INREG type should be vector if the operand "
+           "FP_ROUND_INREG type should be vector iff the operand "
            "type is vector!");
     assert((!EVT.isVector() ||
             EVT.getVectorNumElements() == VT.getVectorNumElements()) &&
@@ -2918,7 +2918,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT,
     assert(VT.isInteger() && EVT.isInteger() &&
            "Cannot *_EXTEND_INREG FP types");
     assert(EVT.isVector() == VT.isVector() &&
-           "SIGN_EXTEND_INREG type should be vector if the operand "
+           "SIGN_EXTEND_INREG type should be vector iff the operand "
            "type is vector!");
     assert((!EVT.isVector() ||
             EVT.getVectorNumElements() == VT.getVectorNumElements()) &&
index 5ed1c03eb1146e8677bb7e4dcf431aace81dca11..be3ecf34f7531ce7252175d08ef7f0873a57a291 100644 (file)
@@ -1330,7 +1330,7 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op,
 
     // If all of the unknown bits are known to be zero on one side or the other
     // (but not both) turn this into an *inclusive* or.
-    //    e.g. (A & C1)^(B & C2) -> (A & C1)|(B & C2) if C1&C2 == 0
+    //    e.g. (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
     if ((NewMask & ~KnownZero & ~KnownZero2) == 0)
       return TLO.CombineTo(Op, TLO.DAG.getNode(ISD::OR, dl, Op.getValueType(),
                                                Op.getOperand(0),
@@ -1344,7 +1344,7 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op,
     // If all of the demanded bits on one side are known, and all of the set
     // bits on that side are also known to be set on the other side, turn this
     // into an AND, as we know the bits will be cleared.
-    //    e.g. (X | C1) ^ C2 --> (X | C1) & ~C2 if (C1&C2) == C2
+    //    e.g. (X | C1) ^ C2 --> (X | C1) & ~C2 iff (C1&C2) == C2
     // NB: it is okay if more bits are known than are requested
     if ((NewMask & (KnownZero|KnownOne)) == NewMask) { // all known on one side 
       if (KnownOne == KnownOne2) { // set bits are the same on both sides
@@ -1970,7 +1970,7 @@ TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
         return DAG.getSetCC(dl, VT, And, DAG.getConstant(0, CTVT), CC);
       }
 
-      // TODO: (ctpop x) == 1 -> x && (x & x-1) == 0 if ctpop is illegal.
+      // TODO: (ctpop x) == 1 -> x && (x & x-1) == 0 iff ctpop is illegal.
     }
 
     // (zext x) == C --> x == (trunc C)
@@ -2503,7 +2503,7 @@ TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
                                 N0.getValueType()), Cond);
           }
 
-          // Turn (X^C1) == C2 into X == C1^C2 if X&~C1 = 0.
+          // Turn (X^C1) == C2 into X == C1^C2 iff X&~C1 = 0.
           if (N0.getOpcode() == ISD::XOR)
             // If we know that all of the inverted bits are zero, don't bother
             // performing the inversion.
index a2a98251c4d7bd1ee0f14892b27109eaace1ff5d..f706cac8d36cef6219aff3454c98471069b767aa 100644 (file)
@@ -289,7 +289,7 @@ size_t StringTable::size() const {
   return Data.size();
 }
 
-/// Add String to the table if it is not already there.
+/// Add String to the table iff it is not already there.
 /// @returns the index into the string table where the string is now located.
 size_t StringTable::insert(llvm::StringRef String) {
   map::iterator i = Map.find(String);
index 1703eeae27fc4825b74c3f03352163d5fb73de78..38cfaed9d217a10142871f099b86fb979e6246f1 100644 (file)
@@ -1860,7 +1860,7 @@ APInt APInt::udiv(const APInt& RHS) const {
     // 0 / X ===> 0
     return APInt(BitWidth, 0);
   else if (lhsWords < rhsWords || this->ult(RHS)) {
-    // X / Y ===> 0, if X < Y
+    // X / Y ===> 0, iff X < Y
     return APInt(BitWidth, 0);
   } else if (*this == RHS) {
     // X / X ===> 1
@@ -1897,7 +1897,7 @@ APInt APInt::urem(const APInt& RHS) const {
     // 0 % Y ===> 0
     return APInt(BitWidth, 0);
   } else if (lhsWords < rhsWords || this->ult(RHS)) {
-    // X % Y ===> X, if X < Y
+    // X % Y ===> X, iff X < Y
     return *this;
   } else if (*this == RHS) {
     // X % X == 0;
@@ -1929,8 +1929,8 @@ void APInt::udivrem(const APInt &LHS, const APInt &RHS,
   }
 
   if (lhsWords < rhsWords || LHS.ult(RHS)) {
-    Remainder = LHS;            // X % Y ===> X, if X < Y
-    Quotient = 0;               // X / Y ===> 0, if X < Y
+    Remainder = LHS;            // X % Y ===> X, iff X < Y
+    Quotient = 0;               // X / Y ===> 0, iff X < Y
     return;
   }
 
index 3e2a183fe1904337a4dd0ba150bd615651252f2b..d8a6ad35ba9cae8805ab9c9f3c1cef2ace2d1ba6 100644 (file)
@@ -96,7 +96,7 @@ struct NameCompare {
 
 }
 
-// Print information when destroyed, if command line option is specified.
+// Print information when destroyed, iff command line option is specified.
 StatisticInfo::~StatisticInfo() {
   llvm::PrintStatistics();
 }
index 1458e33c626af6d6fd2ee47782a067e612481618..8933a02701c61c433c969be931a121be2fc6a28a 100644 (file)
@@ -276,7 +276,7 @@ ARMFastISel::AddOptionalDefs(const MachineInstrBuilder &MIB) {
   if (TII.isPredicable(MI) || isARMNEONPred(MI))
     AddDefaultPred(MIB);
 
-  // Do we optionally set a predicate?  Preds is size > 0 if the predicate
+  // Do we optionally set a predicate?  Preds is size > 0 iff the predicate
   // defines CPSR. All other OptionalDefines in ARM are the CCR register.
   bool CPSR = false;
   if (DefinesOptionalPredicate(MI, &CPSR)) {
index e9f0c8ad5a9f48659e4221fe8243b771a99498e5..1eea0cc61d1d14af0c899fa10d35de364231427b 100644 (file)
@@ -2117,7 +2117,7 @@ SDNode *ARMDAGToDAGISel::SelectV6T2BitfieldExtractOp(SDNode *N,
   if (N->getOpcode() == ISD::AND) {
     if (isOpcWithIntImmediate(N, ISD::AND, And_imm)) {
 
-      // The immediate is a mask of the low bits if imm & (imm+1) == 0
+      // The immediate is a mask of the low bits iff imm & (imm+1) == 0
       if (And_imm & (And_imm + 1))
         return NULL;
 
index 33c48350a7f6d7d3c63d41b15cf42e2242da45eb..f8455a4b0e9597a9e3d8b0d5261d70ddf50c7353 100644 (file)
@@ -727,7 +727,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
   if (!TM.Options.UseSoftFloat && Subtarget->hasVFP2() &&
       !Subtarget->isThumb1Only()) {
     // Turn f64->i64 into VMOVRRD, i64 -> f64 to VMOVDRR
-    // if target supports vfp2.
+    // iff target supports vfp2.
     setOperationAction(ISD::BITCAST, MVT::i64, Custom);
     setOperationAction(ISD::FLT_ROUNDS_, MVT::i32, Custom);
   }
@@ -7692,12 +7692,12 @@ static SDValue PerformORCombine(SDNode *N,
 
   DebugLoc DL = N->getDebugLoc();
   // 1) or (and A, mask), val => ARMbfi A, val, mask
-  //      if (val & mask) == val
+  //      iff (val & mask) == val
   //
   // 2) or (and A, mask), (and B, mask2) => ARMbfi A, (lsr B, amt), mask
-  //  2a) if isBitFieldInvertedMask(mask) && isBitFieldInvertedMask(~mask2)
+  //  2a) iff isBitFieldInvertedMask(mask) && isBitFieldInvertedMask(~mask2)
   //          && mask == ~mask2
-  //  2b) if isBitFieldInvertedMask(~mask) && isBitFieldInvertedMask(mask2)
+  //  2b) iff isBitFieldInvertedMask(~mask) && isBitFieldInvertedMask(mask2)
   //          && ~mask == mask2
   //  (i.e., copy a bitfield value into another bitfield of the same width)
 
index ca3d6d7dacee3f9cc3c2c91ddf476b037f2f99d9..e171f8b0929577ebeae78c471b79e780e419cd69 100644 (file)
@@ -698,7 +698,7 @@ def tLDMIA : T1I<(outs), (ins tGPR:$Rn, pred:$p, reglist:$regs, variable_ops),
 }
 
 // Writeback version is just a pseudo, as there's no encoding difference.
-// Writeback happens if the base register is not in the destination register
+// Writeback happens iff the base register is not in the destination register
 // list.
 def tLDMIA_UPD :
     InstTemplate<AddrModeNone, 0, IndexModeNone, Pseudo, GenericDomain,
index a16931ebd8aae4e3d2486d4b4dc17db8f7d79511..aa5ba46ab21721338045a7390294bce4d7ec04c9 100644 (file)
@@ -5316,7 +5316,7 @@ validateInstruction(MCInst &Inst,
     // instruction. We'll make the transformation in processInstruction()
     // if necessary.
     //
-    // Thumb LDM instructions are writeback if the base register is not
+    // Thumb LDM instructions are writeback iff the base register is not
     // in the register list.
     unsigned Rn = Inst.getOperand(0).getReg();
     bool hasWritebackToken =
@@ -7023,7 +7023,7 @@ processInstruction(MCInst &Inst,
     Inst.addOperand(MCOperand::CreateReg(0)); // cc_out
     break;
   case ARM::tADDi8:
-    // If the immediate is in the range 0-7, we want tADDi3 if Rd was
+    // If the immediate is in the range 0-7, we want tADDi3 iff Rd was
     // explicitly specified. From the ARM ARM: "Encoding T1 is preferred
     // to encoding T2 if <Rd> is specified and encoding T2 is preferred
     // to encoding T1 if <Rd> is omitted."
@@ -7033,7 +7033,7 @@ processInstruction(MCInst &Inst,
     }
     break;
   case ARM::tSUBi8:
-    // If the immediate is in the range 0-7, we want tADDi3 if Rd was
+    // If the immediate is in the range 0-7, we want tADDi3 iff Rd was
     // explicitly specified. From the ARM ARM: "Encoding T1 is preferred
     // to encoding T2 if <Rd> is specified and encoding T2 is preferred
     // to encoding T1 if <Rd> is omitted."
index e704548d39966c158fbc2848d24c89a547bf56c2..5efc6a36b8947eb4be47d1f92efe1f748a655df4 100644 (file)
@@ -221,7 +221,7 @@ bool MSP430DAGToDAGISel::MatchAddress(SDValue N, MSP430ISelAddressMode &AM) {
   }
 
   case ISD::OR:
-    // Handle "X | C" as "X + C" if X is known to have C bits clear.
+    // Handle "X | C" as "X + C" iff X is known to have C bits clear.
     if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N.getOperand(1))) {
       MSP430ISelAddressMode Backup = AM;
       uint64_t Offset = CN->getSExtValue();
index 4f8aa4ccf191e73cc344b384c7f1b7f9e45c243d..e8f4d16997ff35826b80939bdd7b984d60553e30 100644 (file)
@@ -74,7 +74,7 @@ namespace {
       return CurDAG->getTargetConstant(Imm, PPCLowering.getPointerTy());
     }
 
-    /// isRunOfOnes - Returns true if Val consists of one contiguous run of 1s
+    /// isRunOfOnes - Returns true iff Val consists of one contiguous run of 1s
     /// with any number of 0s on either side.  The 1s are allowed to wrap from
     /// LSB to MSB, so 0x000FFF0, 0x0000FFFF, and 0xFF0000FF are all runs.
     /// 0x0F0F0000 is not, since all 1s are not contiguous.
index 2d027ddfc67a139e546340c39136de0f7c425648..791f5982af7c938fe9222ad170db3df404e43072 100644 (file)
@@ -1280,7 +1280,7 @@ void FPS::handleCompareFP(MachineBasicBlock::iterator &I) {
 }
 
 /// handleCondMovFP - Handle two address conditional move instructions.  These
-/// instructions move a st(i) register to st(0) if a condition is true.  These
+/// instructions move a st(i) register to st(0) iff a condition is true.  These
 /// instructions require that the first operand is at the top of the stack, but
 /// otherwise don't modify the stack at all.
 void FPS::handleCondMovFP(MachineBasicBlock::iterator &I) {
index 81be243a0e7a38b508e5bcc4bf7fc2bf0c08f454..40605afb6992f18e703d24a096862c8b8225df34 100644 (file)
@@ -1202,7 +1202,7 @@ bool X86DAGToDAGISel::MatchAddressRecursively(SDValue N, X86ISelAddressMode &AM,
   }
 
   case ISD::OR:
-    // Handle "X | C" as "X + C" if X is known to have C bits clear.
+    // Handle "X | C" as "X + C" iff X is known to have C bits clear.
     if (CurDAG->isBaseWithConstantOffset(N)) {
       X86ISelAddressMode Backup = AM;
       ConstantSDNode *CN = cast<ConstantSDNode>(N.getOperand(1));
index 69c7c9a03c39bbecd48e2a9c89c0fa9f238cff9d..f46989fb020aa072366347fd7a2196e3ba352e67 100644 (file)
@@ -1652,7 +1652,7 @@ static bool isSafeToClobberEFLAGS(MachineBasicBlock &MBB,
   Iter = I;
   for (unsigned i = 0; i < 4; ++i) {
     // If we make it to the beginning of the block, it's safe to clobber
-    // EFLAGS if EFLAGS is not live-in.
+    // EFLAGS iff EFLAGS is not live-in.
     if (Iter == B)
       return !MBB.isLiveIn(X86::EFLAGS);
 
index 8231d1baef2e876957b1026c92e9fc0d35ae4234..3695ce2324f588addc4c87d03a7c247e8edf3150 100644 (file)
@@ -1361,7 +1361,7 @@ SDValue XCoreTargetLowering::PerformDAGCombine(SDNode *N,
       return DAG.getMergeValues(Ops, 2, dl);
     }
 
-    // fold (ladd x, 0, y) -> 0, add x, y if carry is unused and y has only the
+    // fold (ladd x, 0, y) -> 0, add x, y iff carry is unused and y has only the
     // low bit set
     if (N1C && N1C->isNullValue() && N->hasNUsesOfValue(0, 0)) {
       APInt KnownZero, KnownOne;
@@ -1385,7 +1385,7 @@ SDValue XCoreTargetLowering::PerformDAGCombine(SDNode *N,
     ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
     EVT VT = N0.getValueType();
 
-    // fold (lsub 0, 0, x) -> x, -x if x has only the low bit set
+    // fold (lsub 0, 0, x) -> x, -x iff x has only the low bit set
     if (N0C && N0C->isNullValue() && N1C && N1C->isNullValue()) {
       APInt KnownZero, KnownOne;
       APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
@@ -1400,7 +1400,7 @@ SDValue XCoreTargetLowering::PerformDAGCombine(SDNode *N,
       }
     }
 
-    // fold (lsub x, 0, y) -> 0, sub x, y if borrow is unused and y has only the
+    // fold (lsub x, 0, y) -> 0, sub x, y iff borrow is unused and y has only the
     // low bit set
     if (N1C && N1C->isNullValue() && N->hasNUsesOfValue(0, 0)) {
       APInt KnownZero, KnownOne;
index 988c9e53599fd51c47edfbe03a7815b506cfb5db..d8fae8a4b2b906fbf2cfe0faadeac533a59ce66d 100644 (file)
@@ -43,7 +43,7 @@ namespace {
     // duplicate constants.
     bool runOnModule(Module &M);
 
-    // Return true if we can determine the alignment of this global variable.
+    // Return true iff we can determine the alignment of this global variable.
     bool hasKnownAlignment(GlobalVariable *GV) const;
 
     // Return the alignment of the global, including converting the default
index bde60648389b96223e7dca7b4914d689ee7c3f37..b888e9598200f1deddee79c3a60d46c66bd72eeb 100644 (file)
@@ -172,7 +172,7 @@ static AtomicOrdering StrongerOrdering(AtomicOrdering X, AtomicOrdering Y) {
   return (AtomicOrdering)std::max(X, Y);
 }
 
-/// SafeToDestroyConstant - It is safe to destroy a constant if it is only used
+/// SafeToDestroyConstant - It is safe to destroy a constant iff it is only used
 /// by constants itself.  Note that constants cannot be cyclic, so this test is
 /// pretty easy to implement recursively.
 ///
index ae1e3c7b9e4b2beab1c7142cfe3070b6f86013d4..c8cc8fd1930beb09cf4688c0d19557058aa5a08c 100644 (file)
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 // This file implements a simple interprocedural pass which walks the
-// call-graph, turning invoke instructions into calls, if the callee cannot
+// call-graph, turning invoke instructions into calls, iff the callee cannot
 // throw an exception, and marking functions 'nounwind' if they cannot throw.
 // It implements this as a bottom-up traversal of the call-graph.
 //
index 874bb8f292bb459a693630c722b43c06067fee93..99b62f8d05a75065873e349452ff40bf64f7c74c 100644 (file)
@@ -200,7 +200,7 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
   if (dyn_castFoldableMul(RHS, C2) == LHS)
     return BinaryOperator::CreateMul(LHS, AddOne(C2));
 
-  // A+B --> A|B if A and B have no bits set in common.
+  // A+B --> A|B iff A and B have no bits set in common.
   if (IntegerType *IT = dyn_cast<IntegerType>(I.getType())) {
     APInt LHSKnownOne(IT->getBitWidth(), 0);
     APInt LHSKnownZero(IT->getBitWidth(), 0);
@@ -216,7 +216,7 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
     }
   }
 
-  // W*X + Y*Z --> W * (X+Z)  if W == Y
+  // W*X + Y*Z --> W * (X+Z)  iff W == Y
   {
     Value *W, *X, *Y, *Z;
     if (match(LHS, m_Mul(m_Value(W), m_Value(X))) &&
index 85e18a3591f07e9413b31542a7dd814d0574519c..7d0af0d80226f06f3cc4fd1edabac3e44d79cd98 100644 (file)
@@ -315,7 +315,7 @@ Value *InstCombiner::InsertRangeTest(Value *V, Constant *Lo, Constant *Hi,
   return Builder->CreateICmpUGT(Add, LowerBound);
 }
 
-// isRunOfOnes - Returns true if Val consists of one contiguous run of 1s with
+// isRunOfOnes - Returns true iff Val consists of one contiguous run of 1s with
 // any number of 0s on either side.  The 1s are allowed to wrap from LSB to
 // MSB, so 0x000FFF0, 0x0000FFFF, and 0xFF0000FF are all runs.  0x0F0F0000 is
 // not, since all 1s are not contiguous.
@@ -335,9 +335,9 @@ static bool isRunOfOnes(ConstantInt *Val, uint32_t &MB, uint32_t &ME) {
 /// where isSub determines whether the operator is a sub.  If we can fold one of
 /// the following xforms:
 /// 
-/// ((A & N) +/- B) & Mask -> (A +/- B) & Mask if N&Mask == Mask
-/// ((A | N) +/- B) & Mask -> (A +/- B) & Mask if N&Mask == 0
-/// ((A ^ N) +/- B) & Mask -> (A +/- B) & Mask if N&Mask == 0
+/// ((A & N) +/- B) & Mask -> (A +/- B) & Mask iff N&Mask == Mask
+/// ((A | N) +/- B) & Mask -> (A +/- B) & Mask iff N&Mask == 0
+/// ((A ^ N) +/- B) & Mask -> (A +/- B) & Mask iff N&Mask == 0
 ///
 /// return (A +/- B).
 ///
@@ -752,7 +752,7 @@ Value *InstCombiner::FoldAndOfICmps(ICmpInst *LHS, ICmpInst *RHS) {
 
   // (trunc x) == C1 & (and x, CA) == C2 -> (and x, CA|CMAX) == C1|C2
   // where CMAX is the all ones value for the truncated type,
-  // if the lower bits of C2 and CA are zero.
+  // iff the lower bits of C2 and CA are zero.
   if (LHSCC == ICmpInst::ICMP_EQ && LHSCC == RHSCC &&
       LHS->hasOneUse() && RHS->hasOneUse()) {
     Value *V;
@@ -1062,9 +1062,9 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
         break;
       }
       case Instruction::Add:
-        // ((A & N) + B) & AndRHS -> (A + B) & AndRHS if N&AndRHS == AndRHS.
-        // ((A | N) + B) & AndRHS -> (A + B) & AndRHS if N&AndRHS == 0
-        // ((A ^ N) + B) & AndRHS -> (A + B) & AndRHS if N&AndRHS == 0
+        // ((A & N) + B) & AndRHS -> (A + B) & AndRHS iff N&AndRHS == AndRHS.
+        // ((A | N) + B) & AndRHS -> (A + B) & AndRHS iff N&AndRHS == 0
+        // ((A ^ N) + B) & AndRHS -> (A + B) & AndRHS iff N&AndRHS == 0
         if (Value *V = FoldLogicalPlusAnd(Op0LHS, Op0RHS, AndRHS, false, I))
           return BinaryOperator::CreateAnd(V, AndRHS);
         if (Value *V = FoldLogicalPlusAnd(Op0RHS, Op0LHS, AndRHS, false, I))
@@ -1072,13 +1072,13 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
         break;
 
       case Instruction::Sub:
-        // ((A & N) - B) & AndRHS -> (A - B) & AndRHS if N&AndRHS == AndRHS.
-        // ((A | N) - B) & AndRHS -> (A - B) & AndRHS if N&AndRHS == 0
-        // ((A ^ N) - B) & AndRHS -> (A - B) & AndRHS if N&AndRHS == 0
+        // ((A & N) - B) & AndRHS -> (A - B) & AndRHS iff N&AndRHS == AndRHS.
+        // ((A | N) - B) & AndRHS -> (A - B) & AndRHS iff N&AndRHS == 0
+        // ((A ^ N) - B) & AndRHS -> (A - B) & AndRHS iff N&AndRHS == 0
         if (Value *V = FoldLogicalPlusAnd(Op0LHS, Op0RHS, AndRHS, true, I))
           return BinaryOperator::CreateAnd(V, AndRHS);
 
-        // (A - N) & AndRHS -> -N & AndRHS if A&AndRHS==0 and AndRHS
+        // (A - N) & AndRHS -> -N & AndRHS iff A&AndRHS==0 and AndRHS
         // has 1's for all bits that the subtraction with A might affect.
         if (Op0I->hasOneUse() && !match(Op0LHS, m_Zero())) {
           uint32_t BitWidth = AndRHSMask.getBitWidth();
@@ -1472,7 +1472,7 @@ Value *InstCombiner::FoldOrOfICmps(ICmpInst *LHS, ICmpInst *RHS) {
   }
 
   // (icmp ult (X + CA), C1) | (icmp eq X, C2) -> (icmp ule (X + CA), C1)
-  //   if C2 + CA == C1.
+  //   iff C2 + CA == C1.
   if (LHSCC == ICmpInst::ICMP_ULT && RHSCC == ICmpInst::ICMP_EQ) {
     ConstantInt *AddCst;
     if (match(Val, m_Add(m_Specific(Val2), m_ConstantInt(AddCst))))
@@ -1735,7 +1735,7 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
   if (ConstantInt *RHS = dyn_cast<ConstantInt>(Op1)) {
     ConstantInt *C1 = 0; Value *X = 0;
     // (X & C1) | C2 --> (X | C2) & (C1|C2)
-    // if (C1 & C2) == 0.
+    // iff (C1 & C2) == 0.
     if (match(Op0, m_And(m_Value(X), m_ConstantInt(C1))) &&
         (RHS->getValue() & C1->getValue()) != 0 &&
         Op0->hasOneUse()) {
@@ -1779,7 +1779,7 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
       return BSwap;
   }
   
-  // (X^C)|Y -> (X|Y)^C if Y&C == 0
+  // (X^C)|Y -> (X|Y)^C iff Y&C == 0
   if (Op0->hasOneUse() &&
       match(Op0, m_Xor(m_Value(A), m_ConstantInt(C1))) &&
       MaskedValueIsZero(Op1, C1->getValue())) {
@@ -1788,7 +1788,7 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
     return BinaryOperator::CreateXor(NOr, C1);
   }
 
-  // Y|(X^C) -> (X|Y)^C if Y&C == 0
+  // Y|(X^C) -> (X|Y)^C iff Y&C == 0
   if (Op1->hasOneUse() &&
       match(Op1, m_Xor(m_Value(A), m_ConstantInt(C1))) &&
       MaskedValueIsZero(Op0, C1->getValue())) {
@@ -1830,7 +1830,7 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
       
       if ((C1->getValue() & C2->getValue()) == 0) {
         // ((V | N) & C1) | (V & C2) --> (V|N) & (C1|C2)
-        // if (C1&C2) == 0 and (N&~C1) == 0
+        // iff (C1&C2) == 0 and (N&~C1) == 0
         if (match(A, m_Or(m_Value(V1), m_Value(V2))) &&
             ((V1 == B && MaskedValueIsZero(V2, ~C1->getValue())) ||  // (V|N)
              (V2 == B && MaskedValueIsZero(V1, ~C1->getValue()))))   // (N|V)
@@ -1846,7 +1846,7 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
                                                 C1->getValue()|C2->getValue()));
         
         // ((V|C3)&C1) | ((V|C4)&C2) --> (V|C3|C4)&(C1|C2)
-        // if (C1&C2) == 0 and (C3&~C1) == 0 and (C4&~C2) == 0.
+        // iff (C1&C2) == 0 and (C3&~C1) == 0 and (C4&~C2) == 0.
         ConstantInt *C3 = 0, *C4 = 0;
         if (match(A, m_Or(m_Value(V1), m_ConstantInt(C3))) &&
             (C3->getValue() & ~C1->getValue()) == 0 &&
@@ -2146,7 +2146,7 @@ Instruction *InstCombiner::visitXor(BinaryOperator &I) {
 
           }
         } else if (Op0I->getOpcode() == Instruction::Or) {
-          // (X|C1)^C2 -> X^(C1|C2) if X&~C1 == 0
+          // (X|C1)^C2 -> X^(C1|C2) iff X&~C1 == 0
           if (MaskedValueIsZero(Op0I->getOperand(0), Op0CI->getValue())) {
             Constant *NewRHS = ConstantExpr::getOr(Op0CI, RHS);
             // Anything in both C1 and C2 is known to be zero, remove it from
index b8b61d721aa3ef744f126c3ff05c4170a8813412..555b4428d2e8f7d9b55eb5a61b8d2cad93bf2f10 100644 (file)
@@ -381,7 +381,7 @@ static bool CanEvaluateTruncated(Value *V, Type *Ty) {
     break;
   case Instruction::LShr:
     // If this is a truncate of a logical shr, we can truncate it to a smaller
-    // lshr if we know that the bits we would otherwise be shifting in are
+    // lshr iff we know that the bits we would otherwise be shifting in are
     // already zeros.
     if (ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1))) {
       uint32_t OrigBitWidth = OrigTy->getScalarSizeInBits();
@@ -527,14 +527,14 @@ Instruction *InstCombiner::transformZExtICmp(ICmpInst *ICI, Instruction &CI,
       return ReplaceInstUsesWith(CI, In);
     }
 
-    // zext (X == 0) to i32 --> X^1      if X has only the low bit set.
-    // zext (X == 0) to i32 --> (X>>1)^1 if X has only the 2nd bit set.
-    // zext (X == 1) to i32 --> X        if X has only the low bit set.
-    // zext (X == 2) to i32 --> X>>1     if X has only the 2nd bit set.
-    // zext (X != 0) to i32 --> X        if X has only the low bit set.
-    // zext (X != 0) to i32 --> X>>1     if X has only the 2nd bit set.
-    // zext (X != 1) to i32 --> X^1      if X has only the low bit set.
-    // zext (X != 2) to i32 --> (X>>1)^1 if X has only the 2nd bit set.
+    // zext (X == 0) to i32 --> X^1      iff X has only the low bit set.
+    // zext (X == 0) to i32 --> (X>>1)^1 iff X has only the 2nd bit set.
+    // zext (X == 1) to i32 --> X        iff X has only the low bit set.
+    // zext (X == 2) to i32 --> X>>1     iff X has only the 2nd bit set.
+    // zext (X != 0) to i32 --> X        iff X has only the low bit set.
+    // zext (X != 0) to i32 --> X>>1     iff X has only the 2nd bit set.
+    // zext (X != 1) to i32 --> X^1      iff X has only the low bit set.
+    // zext (X != 2) to i32 --> (X>>1)^1 iff X has only the 2nd bit set.
     if ((Op1CV == 0 || Op1CV.isPowerOf2()) && 
         // This only works for EQ and NE
         ICI->isEquality()) {
index 89972f610c0218c20f2ab49981eaf4e9fd541b83..a446e427e5b506b870604af125b68719fd51631a 100644 (file)
@@ -368,7 +368,7 @@ Instruction *InstCombiner::visitLoadInst(LoadInst &LI) {
       LI.setAlignment(EffectiveLoadAlign);
   }
 
-  // load (cast X) --> cast (load X) if safe.
+  // load (cast X) --> cast (load X) iff safe.
   if (isa<CastInst>(Op))
     if (Instruction *Res = InstCombineLoadCast(*this, LI, TD))
       return Res;
index 6d81d6dff8e0e0428261d378363bcfc9d0ead2cc..3361a1e7fbe61990763f0bfe64b9817e52626f4b 100644 (file)
@@ -550,7 +550,7 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) {
     APInt Mask(APInt::getSignBit(I.getType()->getPrimitiveSizeInBits()));
     if (MaskedValueIsZero(Op0, Mask)) {
       if (MaskedValueIsZero(Op1, Mask)) {
-        // X sdiv Y -> X udiv Y, if X and Y don't have sign bit set
+        // X sdiv Y -> X udiv Y, iff X and Y don't have sign bit set
         return BinaryOperator::CreateUDiv(Op0, Op1, I.getName());
       }
       
@@ -692,7 +692,7 @@ Instruction *InstCombiner::visitSRem(BinaryOperator &I) {
   if (I.getType()->isIntegerTy()) {
     APInt Mask(APInt::getSignBit(I.getType()->getPrimitiveSizeInBits()));
     if (MaskedValueIsZero(Op1, Mask) && MaskedValueIsZero(Op0, Mask)) {
-      // X srem Y -> X urem Y, if X and Y don't have sign bit set
+      // X srem Y -> X urem Y, iff X and Y don't have sign bit set
       return BinaryOperator::CreateURem(Op0, Op1, I.getName());
     }
   }
index 598b4d3bd808bb8d59878e1e11efaf7316782463..4bb2403299ce8f4bde1578bd59e06fd4e1a69862 100644 (file)
@@ -37,7 +37,7 @@ Instruction *InstCombiner::commonShiftTransforms(BinaryOperator &I) {
     if (Instruction *Res = FoldShiftByConstant(Op0, CUI, I))
       return Res;
 
-  // X shift (A srem B) -> X shift (A and B-1) if B is a power of 2.
+  // X shift (A srem B) -> X shift (A and B-1) iff B is a power of 2.
   // Because shifts by negative values (which could occur if A were negative)
   // are undefined.
   Value *A; const APInt *B;
@@ -85,7 +85,7 @@ static bool CanEvaluateShifted(Value *V, unsigned NumBits, bool isLeftShift,
       // TODO: Check that the input bits are already zero with MaskedValueIsZero
 #if 0
       // If this is a truncate of a logical shr, we can truncate it to a smaller
-      // lshr if we know that the bits we would otherwise be shifting in are
+      // lshr iff we know that the bits we would otherwise be shifting in are
       // already zeros.
       uint32_t OrigBitWidth = OrigTy->getScalarSizeInBits();
       uint32_t BitWidth = Ty->getScalarSizeInBits();
index 9857f6ab5a252da6495ba6ce9dd81035e1fdd8f0..54be8ed3fa90f0e383da447cc908e7103cb5af2e 100644 (file)
@@ -304,7 +304,7 @@ Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
     
     // If all of the demanded bits are known to be zero on one side or the
     // other, turn this into an *inclusive* or.
-    //    e.g. (A & C1)^(B & C2) -> (A & C1)|(B & C2) if C1&C2 == 0
+    //    e.g. (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
     if ((DemandedMask & ~RHSKnownZero & ~LHSKnownZero) == 0) {
       Instruction *Or = 
         BinaryOperator::CreateOr(I->getOperand(0), I->getOperand(1),
@@ -315,7 +315,7 @@ Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
     // If all of the demanded bits on one side are known, and all of the set
     // bits on that side are also known to be set on the other side, turn this
     // into an AND, as we know the bits will be cleared.
-    //    e.g. (X | C1) ^ C2 --> (X | C1) & ~C2 if (C1&C2) == C2
+    //    e.g. (X | C1) ^ C2 --> (X | C1) & ~C2 iff (C1&C2) == C2
     if ((DemandedMask & (RHSKnownZero|RHSKnownOne)) == DemandedMask) { 
       // all known
       if ((RHSKnownOne & LHSKnownOne) == RHSKnownOne) {
index faa51aa0bac8a406e9680d4b542b12d7c789811f..ff758c40af3bd04e907001d39031ba8cf0f7017e 100644 (file)
@@ -1724,7 +1724,7 @@ Instruction *InstCombiner::visitLandingPadInst(LandingPadInst &LI) {
         continue;
       // At this point we know that LFilter has at least one element.
       if (isa<ConstantAggregateZero>(LFilter)) { // LFilter only contains zeros.
-        // Filter is a subset of LFilter if Filter contains only zeros (as we
+        // Filter is a subset of LFilter iff Filter contains only zeros (as we
         // already know that Filter is not longer than LFilter).
         if (isa<ConstantAggregateZero>(Filter)) {
           assert(FElts <= LElts && "Should have handled this case earlier!");
@@ -1738,7 +1738,7 @@ Instruction *InstCombiner::visitLandingPadInst(LandingPadInst &LI) {
       ConstantArray *LArray = cast<ConstantArray>(LFilter);
       if (isa<ConstantAggregateZero>(Filter)) { // Filter only contains zeros.
         // Since Filter is non-empty and contains only zeros, it is a subset of
-        // LFilter if LFilter contains a zero.
+        // LFilter iff LFilter contains a zero.
         assert(FElts > 0 && "Should have eliminated the empty filter earlier!");
         for (unsigned l = 0; l != LElts; ++l)
           if (LArray->getOperand(l)->isNullValue()) {
index 38f785be0b18a66444f051bd6f4448ac93d5079c..cc27146ebcf009642fa2e788d4f4e3892ae9c637 100644 (file)
@@ -469,7 +469,7 @@ void BLInstrumentationEdge::setIncrement(long increment) {
   _increment = increment;
 }
 
-// True if the edge has already been instrumented.
+// True iff the edge has already been instrumented.
 bool BLInstrumentationEdge::hasInstrumentation() {
   return(_hasInstrumentation);
 }
index 40e151c76a013711eecd32a62ce88336ab7bf487..0f9dfddf574f045f2c57459d1306b314758e8397 100644 (file)
@@ -201,7 +201,7 @@ bool AddressingModeMatcher::MatchOperationAddr(User *AddrInst, unsigned Opcode,
     break;
   }
   //case Instruction::Or:
-  // TODO: We can handle "Or Val, Imm" if this OR is equivalent to an ADD.
+  // TODO: We can handle "Or Val, Imm" iff this OR is equivalent to an ADD.
   //break;
   case Instruction::Mul:
   case Instruction::Shl: {
index 2a604b642df3dd035f0f51ece32c0a382f75b37c..6b04e3d17b9bb8a18c4cadf0472b606907dd3959 100644 (file)
@@ -104,7 +104,7 @@ bool llvm::isCriticalEdge(const TerminatorInst *TI, unsigned SuccNum,
     return I != E;
 
   // If AllowIdenticalEdges is true, then we allow this edge to be considered
-  // non-critical if all preds come from TI's block.
+  // non-critical iff all preds come from TI's block.
   while (I != E) {
     const BasicBlock *P = *I;
     if (P != FirstPred)
index 8c26dd5a51e2da8e0a55a5858191090231b9ee64..c09dcd2ea9ef608dd261abe7612153ba59b365a3 100644 (file)
@@ -557,7 +557,7 @@ namespace {
       // Now we have a map of all of the pairable instructions and we need to
       // select the best possible pairing. A good pairing is one such that the
       // users of the pair are also paired. This defines a (directed) forest
-      // over the pairs such that two pairs are connected if the second pair
+      // over the pairs such that two pairs are connected iff the second pair
       // uses the first.
 
       // Note that it only matters that both members of the second pair use some
index f7582028fc5ce99d46efa0592d161b748636d766..77b2403d87dd1873538d3337593f27ad5eefed21 100644 (file)
@@ -193,7 +193,7 @@ bool DominatorTree::dominates(const BasicBlockEdge &BBE,
   //      .      NormalDest
   //      .
   //
-  // Given the definition of dominance, NormalDest is dominated by X if X
+  // Given the definition of dominance, NormalDest is dominated by X iff X
   // dominates all of NormalDest's predecessors (X, B, C in the example). X
   // trivially dominates itself, so we only have to find if it dominates the
   // other predecessors. Since the only way out of X is via NormalDest, X can
index 2d483a09fc1f1381ced2eba8049733cd6306663f..994a7ffceea55149bc31179a2eb95c27f7ec19e4 100644 (file)
@@ -258,7 +258,7 @@ namespace {
   };
 }
 
-// setPreservesCFG - This function should be called to by the pass, if they do
+// setPreservesCFG - This function should be called to by the pass, iff they do
 // not:
 //
 //  1. Add or remove basic blocks from the function
index 476fdf09063aaaa9f9967646afafcf1e8aad5c5a..53f11499e4b975ded1f1cd243083d8cf9e3bd429 100644 (file)
@@ -1700,7 +1700,7 @@ EnableTiming("time-passes", cl::location(TimePassesIsEnabled),
 void TimingInfo::createTheTimeInfo() {
   if (!TimePassesIsEnabled || TheTimeInfo) return;
 
-  // Constructed the first time this is called, if -time-passes is enabled.
+  // Constructed the first time this is called, iff -time-passes is enabled.
   // This guarantees that the object will be constructed before static globals,
   // thus it will be destroyed before them.
   static ManagedStatic<TimingInfo> TTI;
index 3ef47277a1166a6a3fac2d013955468248994392..1a7a650989b405e4b903e20e165e7bac6a67f052 100644 (file)
@@ -170,7 +170,7 @@ int Type::getFPMantissaWidth() const {
 }
 
 /// isSizedDerivedType - Derived types like structures and arrays are sized
-/// if all of the members of the type are sized as well.  Since asking for
+/// iff all of the members of the type are sized as well.  Since asking for
 /// their size is relatively uncommon, move this operation out of line.
 bool Type::isSizedDerivedType() const {
   if (this->isIntegerTy())
index 4a22e54343b7f69ad153d0abb2f6e4865fc5232c..36ac3d15def642e89e9ae5c23465bbc7482ba579 100644 (file)
@@ -6082,7 +6082,7 @@ _LT_EOF
       *)
        # The compiler driver will combine linker options so we
        # cannot just pass the convience library names through
-       # without $wl, if we do not link with $LD.
+       # without $wl, iff we do not link with $LD.
        # Luckily, gcc supports the same syntax we need for Sun Studio.
        # Supported since Solaris 2.6 (maybe 2.5.1?)
        case $wlarc in
index 5e83075cd1fbb4ecfeed3026268ed59481a9acfe..c0fe15e9fcecb99667ad2599d3fe148661703ad4 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -basicaa -gvn -asan -S | FileCheck %s
-; ASAN conflicts with load widening if the widened load accesses data out of bounds
+; ASAN conflicts with load widening iff the widened load accesses data out of bounds
 ; (while the original unwidened loads do not).
 ; http://code.google.com/p/address-sanitizer/issues/detail?id=20#c1
 
index 68e2433644da17ccf029ba8b2100804694e01313..a316d06894ac6d1b63503c497002e8743fd0d018 100644 (file)
@@ -49,7 +49,7 @@ define i32 @test7(i32 %A) {
         ret i32 %C
 }
 
-; (A & C1)+(B & C2) -> (A & C1)|(B & C2) if C1&C2 == 0
+; (A & C1)+(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
 define i32 @test8(i32 %A, i32 %B) {
         %A1 = and i32 %A, 7             ; <i32> [#uses=1]
         %B1 = and i32 %B, 128           ; <i32> [#uses=1]
index 0d98f605d5bee1f4e58a0f5b42d4fc9c44805ca8..01cbcf158cd9860de2f04c91c5a805108c28b3db 100644 (file)
@@ -5,7 +5,7 @@
 
 
 define i47 @test1(i47 %A, i47 %B) {
-        ;; (A & C1)^(B & C2) -> (A & C1)|(B & C2) if C1&C2 == 0
+        ;; (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
         %A1 = and i47 %A, 70368744177664
         %B1 = and i47 %B, 70368744177661
         %C1 = xor i47 %A1, %B1
@@ -43,7 +43,7 @@ define i7 @test6(i7 %A) {
 }
 
 define i47 @test7(i47 %A) {
-        ;; (A | C1) ^ C2 -> (A | C1) & ~C2 if (C1&C2) == C2
+        ;; (A | C1) ^ C2 -> (A | C1) & ~C2 iff (C1&C2) == C2
         %B1 = or i47 %A,   70368744177663
         %C1 = xor i47 %B1, 703687463
         ret i47 %C1
index 556ae0fdebd3c49a5a25607c84677886bd0fd6f2..ab93c92381528547a893f7a198a478692ecf3662 100644 (file)
@@ -6,7 +6,7 @@
 
 
 define i447 @test1(i447 %A, i447 %B) {
-        ;; (A & C1)^(B & C2) -> (A & C1)|(B & C2) if C1&C2 == 0
+        ;; (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
         %A1 = and i447 %A, 70368744177664
         %B1 = and i447 %B, 70368744177663
         %C1 = xor i447 %A1, %B1
@@ -44,7 +44,7 @@ define i77 @test6(i77 %A) {
 }
 
 define i1023 @test7(i1023 %A) {
-        ;; (A | C1) ^ C2 -> (A | C1) & ~C2 if (C1&C2) == C2
+        ;; (A | C1) ^ C2 -> (A | C1) & ~C2 iff (C1&C2) == C2
         %B1 = or i1023 %A,   70368744177663
         %C1 = xor i1023 %B1, 703687463
         ret i1023 %C1
index 8129b2bc76e2d9d84d47054a7f55d761b545d271..aed16f47e012b5853b83f5071e0899260115218c 100644 (file)
@@ -48,7 +48,7 @@ namespace llvm {
   public:
     ReducePassList(BugDriver &bd) : BD(bd) {}
 
-    // doTest - Return true if running the "removed" passes succeeds, and
+    // doTest - Return true iff running the "removed" passes succeeds, and
     // running the "Kept" passes fail when run on the output of the "removed"
     // passes.  If we return true, we update the current module of bugpoint.
     //
index ba762bdec3d6b1cc9a563fac057787732628f114..89dece1f3339419048cdbf05bc1838c184c66f5d 100644 (file)
@@ -1,7 +1,7 @@
 #! /usr/bin/python
 
 #this is a script to extract given named nodes from a dot file, with
-#the associated edges.  An edge is kept if for edge x -> y
+#the associated edges.  An edge is kept iff for edge x -> y
 # x and y are both nodes specified to be kept.
 
 #known issues: if a line contains '->' and is not an edge line
index 01deaab53fcc0dc8540496971d5298267b3a4f83..f195b4e3fa980af7e484a60cb926fc91c0e71d10 100644 (file)
@@ -532,7 +532,7 @@ CodeGenRegister::addSubRegsPreOrder(SetVector<const CodeGenRegister*> &OSet,
 //
 // Alternatively:
 //
-//    overlap(A, B) if there exists:
+//    overlap(A, B) iff there exists:
 //    A' in { A, subregs(A) } and B' in { B, subregs(B) } such that:
 //    A' = B' or A' in aliases(B') or B' in aliases(A').
 //
index 3bd4b099463097d661458a448f1dfc94ea462411..e4110741561248c912bd95e2e54589c4cdad5aa7 100644 (file)
@@ -183,7 +183,7 @@ namespace llvm {
     bool inheritRegUnits(CodeGenRegBank &RegBank);
 
     // Adopt a register unit for pressure tracking.
-    // A unit is adopted if its unit number is >= NumNativeRegUnits.
+    // A unit is adopted iff its unit number is >= NumNativeRegUnits.
     void adoptRegUnit(unsigned RUID) { RegUnits.push_back(RUID); }
 
     // Get the sum of this register's register unit weights.
index 3641ca5886232136c0167265e1405c11df52e6ea..bf7e32c238359d137004e6f4bc8682832d8ae45e 100644 (file)
@@ -484,7 +484,7 @@ static ::std::string FormatDeathTestOutput(const ::std::string& output) {
 //   status_ok: true if exit_status is acceptable in the context of
 //              this particular death test, which fails if it is false
 //
-// Returns true if all of the above conditions are met.  Otherwise, the
+// Returns true iff all of the above conditions are met.  Otherwise, the
 // first failing condition, in the order given above, is the one that is
 // reported. Also sets the last death test message string.
 bool DeathTestImpl::Passed(bool status_ok) {
index 6aade8f8c9cb96cb04615235447f3c8bbd3d6dc2..3c32ff1ac1ecef9d44af661e968069a959126dec 100644 (file)
@@ -124,7 +124,7 @@ RE::~RE() {
   free(const_cast<char*>(pattern_));
 }
 
-// Returns true if regular expression re matches the entire str.
+// Returns true iff regular expression re matches the entire str.
 bool RE::FullMatch(const char* str, const RE& re) {
   if (!re.is_valid_) return false;
 
@@ -132,7 +132,7 @@ bool RE::FullMatch(const char* str, const RE& re) {
   return regexec(&re.full_regex_, str, 1, &match, 0) == 0;
 }
 
-// Returns true if regular expression re matches a substring of str
+// Returns true iff regular expression re matches a substring of str
 // (including str itself).
 bool RE::PartialMatch(const char* str, const RE& re) {
   if (!re.is_valid_) return false;
@@ -173,13 +173,13 @@ void RE::Init(const char* regex) {
 
 #elif GTEST_USES_SIMPLE_RE
 
-// Returns true if ch appears anywhere in str (excluding the
+// Returns true iff ch appears anywhere in str (excluding the
 // terminating '\0' character).
 bool IsInSet(char ch, const char* str) {
   return ch != '\0' && strchr(str, ch) != NULL;
 }
 
-// Returns true if ch belongs to the given classification.  Unlike
+// Returns true iff ch belongs to the given classification.  Unlike
 // similar functions in <ctype.h>, these aren't affected by the
 // current locale.
 bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
@@ -193,12 +193,12 @@ bool IsAsciiWordChar(char ch) {
       ('0' <= ch && ch <= '9') || ch == '_';
 }
 
-// Returns true if "\\c" is a supported escape sequence.
+// Returns true iff "\\c" is a supported escape sequence.
 bool IsValidEscape(char c) {
   return (IsAsciiPunct(c) || IsInSet(c, "dDfnrsStvwW"));
 }
 
-// Returns true if the given atom (specified by escaped and pattern)
+// Returns true iff the given atom (specified by escaped and pattern)
 // matches ch.  The result is undefined if the atom is invalid.
 bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
   if (escaped) {  // "\\p" where p is pattern_char.
@@ -240,7 +240,7 @@ bool ValidateRegex(const char* regex) {
 
   bool is_valid = true;
 
-  // True if ?, *, or + can follow the previous atom.
+  // True iff ?, *, or + can follow the previous atom.
   bool prev_repeatable = false;
   for (int i = 0; regex[i]; i++) {
     if (regex[i] == '\\') {  // An escape sequence
@@ -316,7 +316,7 @@ bool MatchRepetitionAndRegexAtHead(
   return false;
 }
 
-// Returns true if regex matches a prefix of str.  regex must be a
+// Returns true iff regex matches a prefix of str.  regex must be a
 // valid simple regular expression and not start with "^", or the
 // result is undefined.
 bool MatchRegexAtHead(const char* regex, const char* str) {
@@ -347,7 +347,7 @@ bool MatchRegexAtHead(const char* regex, const char* str) {
   }
 }
 
-// Returns true if regex matches any substring of str.  regex must be
+// Returns true iff regex matches any substring of str.  regex must be
 // a valid simple regular expression, or the result is undefined.
 //
 // The algorithm is recursive, but the recursion depth doesn't exceed
@@ -377,12 +377,12 @@ RE::~RE() {
   free(const_cast<char*>(full_pattern_));
 }
 
-// Returns true if regular expression re matches the entire str.
+// Returns true iff regular expression re matches the entire str.
 bool RE::FullMatch(const char* str, const RE& re) {
   return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str);
 }
 
-// Returns true if regular expression re matches a substring of str
+// Returns true iff regular expression re matches a substring of str
 // (including str itself).
 bool RE::PartialMatch(const char* str, const RE& re) {
   return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str);
@@ -707,7 +707,7 @@ bool ParseInt32(const Message& src_text, const char* str, Int32* value) {
 // Reads and returns the Boolean environment variable corresponding to
 // the given flag; if it's not set, returns default_value.
 //
-// The value is considered true if it's not "0".
+// The value is considered true iff it's not "0".
 bool BoolFromGTestEnv(const char* flag, bool default_value) {
   const String env_var = FlagToEnvVar(flag);
   const char* const string_value = posix::GetEnv(env_var.c_str());
index 5563a2f3c547d11761ff718763f5d162d93da669..eb5c68c272c0c534d8803c5f8fb7852dae8babc7 100644 (file)
@@ -173,7 +173,7 @@ namespace internal {
 // stack trace.
 const char kStackTraceMarker[] = "\nStack trace:\n";
 
-// g_help_flag is true if the --help flag or an equivalent form is
+// g_help_flag is true iff the --help flag or an equivalent form is
 // specified on the command line.
 bool g_help_flag = false;
 
@@ -187,12 +187,12 @@ GTEST_DEFINE_bool_(
 GTEST_DEFINE_bool_(
     break_on_failure,
     internal::BoolFromGTestEnv("break_on_failure", false),
-    "True if a failed assertion should be a debugger break-point.");
+    "True iff a failed assertion should be a debugger break-point.");
 
 GTEST_DEFINE_bool_(
     catch_exceptions,
     internal::BoolFromGTestEnv("catch_exceptions", true),
-    "True if " GTEST_NAME_
+    "True iff " GTEST_NAME_
     " should catch exceptions and treat them as test failures.");
 
 GTEST_DEFINE_string_(
@@ -230,7 +230,7 @@ GTEST_DEFINE_string_(
 GTEST_DEFINE_bool_(
     print_time,
     internal::BoolFromGTestEnv("print_time", true),
-    "True if " GTEST_NAME_
+    "True iff " GTEST_NAME_
     " should display elapsed time in text output.");
 
 GTEST_DEFINE_int32_(
@@ -247,13 +247,13 @@ GTEST_DEFINE_int32_(
 
 GTEST_DEFINE_bool_(
     show_internal_stack_frames, false,
-    "True if " GTEST_NAME_ " should include internal stack frames when "
+    "True iff " GTEST_NAME_ " should include internal stack frames when "
     "printing test failure stack traces.");
 
 GTEST_DEFINE_bool_(
     shuffle,
     internal::BoolFromGTestEnv("shuffle", false),
-    "True if " GTEST_NAME_
+    "True iff " GTEST_NAME_
     " should randomize tests' order on every run.");
 
 GTEST_DEFINE_int32_(
@@ -297,7 +297,7 @@ UInt32 Random::Generate(UInt32 range) {
   return state_ % range;
 }
 
-// GTestIsInitialized() returns true if the user has initialized
+// GTestIsInitialized() returns true iff the user has initialized
 // Google Test.  Useful for catching the user mistake of not initializing
 // Google Test before calling RUN_ALL_TESTS().
 //
@@ -320,17 +320,17 @@ static int SumOverTestCaseList(const std::vector<TestCase*>& case_list,
   return sum;
 }
 
-// Returns true if the test case passed.
+// Returns true iff the test case passed.
 static bool TestCasePassed(const TestCase* test_case) {
   return test_case->should_run() && test_case->Passed();
 }
 
-// Returns true if the test case failed.
+// Returns true iff the test case failed.
 static bool TestCaseFailed(const TestCase* test_case) {
   return test_case->should_run() && test_case->Failed();
 }
 
-// Returns true if test_case contains at least one test that should
+// Returns true iff test_case contains at least one test that should
 // run.
 static bool ShouldRunTestCase(const TestCase* test_case) {
   return test_case->should_run();
@@ -425,7 +425,7 @@ String UnitTestOptions::GetAbsolutePathToOutputFile() {
   return result.ToString();
 }
 
-// Returns true if the wildcard pattern matches the string.  The
+// Returns true iff the wildcard pattern matches the string.  The
 // first ':' or '\0' character in pattern marks the end of it.
 //
 // This recursive algorithm isn't very efficient, but is clear and
@@ -469,7 +469,7 @@ bool UnitTestOptions::MatchesFilter(const String& name, const char* filter) {
 
 // TODO(keithray): move String function implementations to gtest-string.cc.
 
-// Returns true if the user-specified filter matches the test case
+// Returns true iff the user-specified filter matches the test case
 // name and the test name.
 bool UnitTestOptions::FilterMatchesTest(const String &test_case_name,
                                         const String &test_name) {
@@ -887,7 +887,7 @@ const char* String::Utf16ToAnsi(LPCWSTR utf16_str)  {
 
 #endif  // GTEST_OS_WINDOWS_MOBILE
 
-// Compares two C strings.  Returns true if they have the same content.
+// Compares two C strings.  Returns true iff they have the same content.
 //
 // Unlike strcmp(), this function can handle NULL argument(s).  A NULL
 // C string is considered different to any non-NULL C string,
@@ -992,7 +992,7 @@ namespace internal {
 //   expected_value:      "5"
 //   actual_value:        "6"
 //
-// The ignoring_case parameter is true if the assertion is a
+// The ignoring_case parameter is true iff the assertion is a
 // *_STRCASEEQ*.  When it's true, the string " (ignoring case)" will
 // be inserted into the message.
 AssertionResult EqFailure(const char* expected_expression,
@@ -1224,7 +1224,7 @@ namespace {
 
 // Helper functions for implementing IsSubString() and IsNotSubstring().
 
-// This group of overloaded functions return true if needle is a
+// This group of overloaded functions return true iff needle is a
 // substring of haystack.  NULL is considered a substring of itself
 // only.
 
@@ -1542,7 +1542,7 @@ String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
                         String::ShowWideCString(wide_c_str).c_str());
 }
 
-// Compares two wide C strings.  Returns true if they have the same
+// Compares two wide C strings.  Returns true iff they have the same
 // content.
 //
 // Unlike wcscmp(), this function can handle NULL argument(s).  A NULL
@@ -1587,7 +1587,7 @@ AssertionResult CmpHelperSTRNE(const char* s1_expression,
                             << " vs " << String::ShowWideCStringQuoted(s2);
 }
 
-// Compares two C strings, ignoring case.  Returns true if they have
+// Compares two C strings, ignoring case.  Returns true iff they have
 // the same content.
 //
 // Unlike strcasecmp(), this function can handle NULL argument(s).  A
@@ -1601,7 +1601,7 @@ bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) {
   return posix::StrCaseCmp(lhs, rhs) == 0;
 }
 
-  // Compares two wide C strings, ignoring case.  Returns true if they
+  // Compares two wide C strings, ignoring case.  Returns true iff they
   // have the same content.
   //
   // Unlike wcscasecmp(), this function can handle NULL argument(s).
@@ -1661,7 +1661,7 @@ int String::Compare(const String & rhs) const {
       (length() > rhs.length()) ? 1 : 0;
 }
 
-// Returns true if this String ends with the given suffix.  *Any*
+// Returns true iff this String ends with the given suffix.  *Any*
 // String is considered to end with a NULL or empty suffix.
 bool String::EndsWith(const char* suffix) const {
   if (suffix == NULL || CStringEquals(suffix, "")) return true;
@@ -1674,7 +1674,7 @@ bool String::EndsWith(const char* suffix) const {
          CStringEquals(c_str() + this_len - suffix_len, suffix);
 }
 
-// Returns true if this String ends with the given suffix, ignoring case.
+// Returns true iff this String ends with the given suffix, ignoring case.
 // Any String is considered to end with a NULL or empty suffix.
 bool String::EndsWithCaseInsensitive(const char* suffix) const {
   if (suffix == NULL || CStringEquals(suffix, "")) return true;
@@ -1849,7 +1849,7 @@ void TestResult::Clear() {
   elapsed_time_ = 0;
 }
 
-// Returns true if the test failed.
+// Returns true iff the test failed.
 bool TestResult::Failed() const {
   for (int i = 0; i < total_part_count(); ++i) {
     if (GetTestPartResult(i).failed())
@@ -1858,22 +1858,22 @@ bool TestResult::Failed() const {
   return false;
 }
 
-// Returns true if the test part fatally failed.
+// Returns true iff the test part fatally failed.
 static bool TestPartFatallyFailed(const TestPartResult& result) {
   return result.fatally_failed();
 }
 
-// Returns true if the test fatally failed.
+// Returns true iff the test fatally failed.
 bool TestResult::HasFatalFailure() const {
   return CountIf(test_part_results_, TestPartFatallyFailed) > 0;
 }
 
-// Returns true if the test part non-fatally failed.
+// Returns true iff the test part non-fatally failed.
 static bool TestPartNonfatallyFailed(const TestPartResult& result) {
   return result.nonfatally_failed();
 }
 
-// Returns true if the test has a non-fatal failure.
+// Returns true iff the test has a non-fatal failure.
 bool TestResult::HasNonfatalFailure() const {
   return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0;
 }
@@ -2170,12 +2170,12 @@ void Test::Run() {
       this, &Test::TearDown, "TearDown()");
 }
 
-// Returns true if the current test has a fatal failure.
+// Returns true iff the current test has a fatal failure.
 bool Test::HasFatalFailure() {
   return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure();
 }
 
-// Returns true if the current test has a non-fatal failure.
+// Returns true iff the current test has a non-fatal failure.
 bool Test::HasNonfatalFailure() {
   return internal::GetUnitTestImpl()->current_test_result()->
       HasNonfatalFailure();
@@ -2553,7 +2553,7 @@ const char* GetAnsiColorCode(GTestColor color) {
 
 #endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
 
-// Returns true if Google Test should use colors in the output.
+// Returns true iff Google Test should use colors in the output.
 bool ShouldUseColor(bool stdout_is_tty) {
   const char* const gtest_color = GTEST_FLAG(color).c_str();
 
@@ -3668,10 +3668,10 @@ internal::TimeInMillis UnitTest::elapsed_time() const {
   return impl()->elapsed_time();
 }
 
-// Returns true if the unit test passed (i.e. all test cases passed).
+// Returns true iff the unit test passed (i.e. all test cases passed).
 bool UnitTest::Passed() const { return impl()->Passed(); }
 
-// Returns true if the unit test failed (i.e. some test case failed
+// Returns true iff the unit test failed (i.e. some test case failed
 // or something outside of all tests failed).
 bool UnitTest::Failed() const { return impl()->Failed(); }
 
@@ -4040,7 +4040,7 @@ class TestCaseNameIs {
   explicit TestCaseNameIs(const String& name)
       : name_(name) {}
 
-  // Returns true if the name of test_case matches name_.
+  // Returns true iff the name of test_case matches name_.
   bool operator()(const TestCase* test_case) const {
     return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0;
   }
@@ -4132,7 +4132,7 @@ bool UnitTestImpl::RunAllTests() {
   // protocol.
   internal::WriteToShardStatusFileIfNeeded();
 
-  // True if we are in a subprocess for running a thread-safe-style
+  // True iff we are in a subprocess for running a thread-safe-style
   // death test.
   bool in_subprocess_for_death_test = false;
 
@@ -4159,7 +4159,7 @@ bool UnitTestImpl::RunAllTests() {
   random_seed_ = GTEST_FLAG(shuffle) ?
       GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0;
 
-  // True if at least one test has failed.
+  // True iff at least one test has failed.
   bool failed = false;
 
   TestEventListener* repeater = listeners()->repeater();
@@ -4328,7 +4328,7 @@ Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
 }
 
 // Given the total number of shards, the shard index, and the test id,
-// returns true if the test should be run on this shard. The test id is
+// returns true iff the test should be run on this shard. The test id is
 // some arbitrary but unique non-negative integer assigned to each test
 // method. Assumes that 0 <= shard_index < total_shards.
 bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {
index 3059005316797206f8e1c6d810de2fe3bc7de061..8aeea14984e06f90f4eebf6b78e6e473c470393f 100644 (file)
@@ -85,16 +85,16 @@ class GTEST_API_ TestPartResult {
   // Gets the message associated with the test part.
   const char* message() const { return message_.c_str(); }
 
-  // Returns true if the test part passed.
+  // Returns true iff the test part passed.
   bool passed() const { return type_ == kSuccess; }
 
-  // Returns true if the test part failed.
+  // Returns true iff the test part failed.
   bool failed() const { return type_ != kSuccess; }
 
-  // Returns true if the test part non-fatally failed.
+  // Returns true iff the test part non-fatally failed.
   bool nonfatally_failed() const { return type_ == kNonFatalFailure; }
 
-  // Returns true if the test part fatally failed.
+  // Returns true iff the test part fatally failed.
   bool fatally_failed() const { return type_ == kFatalFailure; }
  private:
   Type type_;
index d66aaa9ed86f3bab37163d80ec3926227cfa4dda..1734c4432e1c49b4093962140f0ff474edf11dd2 100644 (file)
@@ -270,7 +270,7 @@ class GTEST_API_ AssertionResult {
   // Used in the EXPECT_TRUE/FALSE(bool_expression).
   explicit AssertionResult(bool success) : success_(success) {}
 
-  // Returns true if the assertion succeeded.
+  // Returns true iff the assertion succeeded.
   operator bool() const { return success_; }  // NOLINT
 
   // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
@@ -381,13 +381,13 @@ class GTEST_API_ Test {
   // class.
   static void TearDownTestCase() {}
 
-  // Returns true if the current test has a fatal failure.
+  // Returns true iff the current test has a fatal failure.
   static bool HasFatalFailure();
 
-  // Returns true if the current test has a non-fatal failure.
+  // Returns true iff the current test has a non-fatal failure.
   static bool HasNonfatalFailure();
 
-  // Returns true if the current test has a (either fatal or
+  // Returns true iff the current test has a (either fatal or
   // non-fatal) failure.
   static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }
 
@@ -417,7 +417,7 @@ class GTEST_API_ Test {
   virtual void TearDown();
 
  private:
-  // Returns true if the current test has the same fixture class as
+  // Returns true iff the current test has the same fixture class as
   // the first test in the current test case.
   static bool HasSameFixtureClass();
 
@@ -520,16 +520,16 @@ class GTEST_API_ TestResult {
   // Returns the number of the test properties.
   int test_property_count() const;
 
-  // Returns true if the test passed (i.e. no test part failed).
+  // Returns true iff the test passed (i.e. no test part failed).
   bool Passed() const { return !Failed(); }
 
-  // Returns true if the test failed.
+  // Returns true iff the test failed.
   bool Failed() const;
 
-  // Returns true if the test fatally failed.
+  // Returns true iff the test fatally failed.
   bool HasFatalFailure() const;
 
-  // Returns true if the test has a non-fatal failure.
+  // Returns true iff the test has a non-fatal failure.
   bool HasNonfatalFailure() const;
 
   // Returns the elapsed time, in milliseconds.
@@ -720,8 +720,8 @@ class GTEST_API_ TestInfo {
   // value-parameterized test.
   const internal::scoped_ptr<const ::std::string> value_param_;
   const internal::TypeId fixture_class_id_;   // ID of the test fixture class
-  bool should_run_;                 // True if this test should run
-  bool is_disabled_;                // True if this test is disabled
+  bool should_run_;                 // True iff this test should run
+  bool is_disabled_;                // True iff this test is disabled
   bool matches_filter_;             // True if this test matches the
                                     // user-specified filter.
   internal::TestFactoryBase* const factory_;  // The factory that creates
@@ -787,10 +787,10 @@ class GTEST_API_ TestCase {
   // Gets the number of all tests in this test case.
   int total_test_count() const;
 
-  // Returns true if the test case passed.
+  // Returns true iff the test case passed.
   bool Passed() const { return !Failed(); }
 
-  // Returns true if the test case failed.
+  // Returns true iff the test case failed.
   bool Failed() const { return failed_test_count() > 0; }
 
   // Returns the elapsed time, in milliseconds.
@@ -842,17 +842,17 @@ class GTEST_API_ TestCase {
   // needed for catching exceptions thrown from TearDownTestCase().
   void RunTearDownTestCase() { (*tear_down_tc_)(); }
 
-  // Returns true if test passed.
+  // Returns true iff test passed.
   static bool TestPassed(const TestInfo* test_info) {
     return test_info->should_run() && test_info->result()->Passed();
   }
 
-  // Returns true if test failed.
+  // Returns true iff test failed.
   static bool TestFailed(const TestInfo* test_info) {
     return test_info->should_run() && test_info->result()->Failed();
   }
 
-  // Returns true if test is disabled.
+  // Returns true iff test is disabled.
   static bool TestDisabled(const TestInfo* test_info) {
     return test_info->is_disabled_;
   }
@@ -884,7 +884,7 @@ class GTEST_API_ TestCase {
   Test::SetUpTestCaseFunc set_up_tc_;
   // Pointer to the function that tears down the test case.
   Test::TearDownTestCaseFunc tear_down_tc_;
-  // True if any test in this test case should run.
+  // True iff any test in this test case should run.
   bool should_run_;
   // Elapsed time, in milliseconds.
   TimeInMillis elapsed_time_;
@@ -1155,10 +1155,10 @@ class GTEST_API_ UnitTest {
   // Gets the elapsed time, in milliseconds.
   TimeInMillis elapsed_time() const;
 
-  // Returns true if the unit test passed (i.e. all test cases passed).
+  // Returns true iff the unit test passed (i.e. all test cases passed).
   bool Passed() const;
 
-  // Returns true if the unit test failed (i.e. some test case failed
+  // Returns true iff the unit test failed (i.e. some test case failed
   // or something outside of all tests failed).
   bool Failed() const;
 
@@ -1339,7 +1339,7 @@ GTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression,
                                        BiggestInt actual);
 
 // The helper class for {ASSERT|EXPECT}_EQ.  The template argument
-// lhs_is_null_literal is true if the first argument to ASSERT_EQ()
+// lhs_is_null_literal is true iff the first argument to ASSERT_EQ()
 // is a null pointer literal.  The following default implementation is
 // for lhs_is_null_literal being false.
 template <bool lhs_is_null_literal>
@@ -2043,7 +2043,7 @@ GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,
     __FILE__, __LINE__, ::testing::Message() << (message))
 
 // Compile-time assertion for type equality.
-// StaticAssertTypeEq<type1, type2>() compiles if type1 and type2 are
+// StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are
 // the same type.  The value it returns is not interesting.
 //
 // Instead of making StaticAssertTypeEq a class template, we make it a
index 329c646a56d845e472c749f544f35f819248287c..7bac2bd872bb28772288f9d7d8e905d97b0a39f4 100644 (file)
@@ -256,7 +256,7 @@ InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();
 // This macro is used for implementing macros such as
 // EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
 // death tests are not supported. Those macros must compile on such systems
-// if EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
+// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
 // systems that support death tests. This allows one to write such a macro
 // on a system that does not support death tests and be sure that it will
 // compile on a death-test supporting system.
@@ -266,7 +266,7 @@ InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();
 //                for program termination. This macro has to make sure this
 //                statement is compiled but not executed, to ensure that
 //                EXPECT_DEATH_IF_SUPPORTED compiles with a certain
-//                parameter if EXPECT_DEATH compiles with it.
+//                parameter iff EXPECT_DEATH compiles with it.
 //   regex     -  A regex that a macro such as EXPECT_DEATH would use to test
 //                the output of statement.  This parameter has to be
 //                compiled but not evaluated by this macro, to ensure that
index 8331891faa1353a37f4d72172e8c220aa1f1f988..823c6bdc258ac4e6cb254ca3705b2c0b073d38c3 100644 (file)
@@ -111,7 +111,7 @@ class GTEST_API_ FilePath {
                                          const FilePath& base_name,
                                          const char* extension);
 
-  // Returns true if the path is NULL or "".
+  // Returns true iff the path is NULL or "".
   bool IsEmpty() const { return c_str() == NULL || *c_str() == '\0'; }
 
   // If input name has a trailing separator character, removes it and returns
index 838024fa80e9b0ea4eb96ff147dd97fedccbe303..6554cfc07e619a79971822f7c6693e8fedaf4281 100644 (file)
@@ -37,7 +37,7 @@
 #ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_
 #define GTEST_SRC_GTEST_INTERNAL_INL_H_
 
-// GTEST_IMPLEMENTATION_ is defined to 1 if the current translation unit is
+// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is
 // part of Google Test's implementation; otherwise it's undefined.
 #if !GTEST_IMPLEMENTATION_
 // A user is trying to include this from his code - just say no.
@@ -99,14 +99,14 @@ const char kThrowOnFailureFlag[] = "throw_on_failure";
 // A valid random seed must be in [1, kMaxRandomSeed].
 const int kMaxRandomSeed = 99999;
 
-// g_help_flag is true if the --help flag or an equivalent form is
+// g_help_flag is true iff the --help flag or an equivalent form is
 // specified on the command line.
 GTEST_API_ extern bool g_help_flag;
 
 // Returns the current time in milliseconds.
 GTEST_API_ TimeInMillis GetTimeInMillis();
 
-// Returns true if Google Test should use colors in the output.
+// Returns true iff Google Test should use colors in the output.
 GTEST_API_ bool ShouldUseColor(bool stdout_is_tty);
 
 // Formats the given time in milliseconds as seconds.
@@ -258,7 +258,7 @@ GTEST_API_ bool ShouldShard(const char* total_shards_str,
 GTEST_API_ Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val);
 
 // Given the total number of shards, the shard index, and the test id,
-// returns true if the test should be run on this shard. The test id is
+// returns true iff the test should be run on this shard. The test id is
 // some arbitrary but unique non-negative integer assigned to each test
 // method. Assumes that 0 <= shard_index < total_shards.
 GTEST_API_ bool ShouldRunTestOnShard(
@@ -341,7 +341,7 @@ class TestPropertyKeyIs {
   explicit TestPropertyKeyIs(const char* key)
       : key_(key) {}
 
-  // Returns true if the test name of test property matches on key_.
+  // Returns true iff the test name of test property matches on key_.
   bool operator()(const TestProperty& test_property) const {
     return String(test_property.key()).Compare(key_) == 0;
   }
@@ -374,14 +374,14 @@ class GTEST_API_ UnitTestOptions {
 
   // Functions for processing the gtest_filter flag.
 
-  // Returns true if the wildcard pattern matches the string.  The
+  // Returns true iff the wildcard pattern matches the string.  The
   // first ':' or '\0' character in pattern marks the end of it.
   //
   // This recursive algorithm isn't very efficient, but is clear and
   // works well enough for matching test names, which are short.
   static bool PatternMatchesString(const char *pattern, const char *str);
 
-  // Returns true if the user-specified filter matches the test case
+  // Returns true iff the user-specified filter matches the test case
   // name and the test name.
   static bool FilterMatchesTest(const String &test_case_name,
                                 const String &test_name);
@@ -550,10 +550,10 @@ class GTEST_API_ UnitTestImpl {
   // Gets the elapsed time, in milliseconds.
   TimeInMillis elapsed_time() const { return elapsed_time_; }
 
-  // Returns true if the unit test passed (i.e. all test cases passed).
+  // Returns true iff the unit test passed (i.e. all test cases passed).
   bool Passed() const { return !Failed(); }
 
-  // Returns true if the unit test failed (i.e. some test case failed
+  // Returns true iff the unit test failed (i.e. some test case failed
   // or something outside of all tests failed).
   bool Failed() const {
     return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed();
@@ -870,7 +870,7 @@ class GTEST_API_ UnitTestImpl {
   // desired.
   OsStackTraceGetterInterface* os_stack_trace_getter_;
 
-  // True if PostFlagParsingInit() has been called.
+  // True iff PostFlagParsingInit() has been called.
   bool post_flag_parse_init_performed_;
 
   // The random number seed used at the beginning of the test run.
index c92a16fab6692a0a01168b4839c48f8199aa4c1b..f8a5cc9447b1f35fce32f885e61b3e8871e5a4a8 100644 (file)
@@ -287,7 +287,7 @@ GTEST_FORMAT_CHAR_PTR_IMPL_(const wchar_t)
 //   expected_value:      "5"
 //   actual_value:        "6"
 //
-// The ignoring_case parameter is true if the assertion is a
+// The ignoring_case parameter is true iff the assertion is a
 // *_STRCASEEQ*.  When it's true, the string " (ignoring case)" will
 // be inserted into the message.
 GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
@@ -413,14 +413,14 @@ class FloatingPoint {
   // Returns the sign bit of this number.
   Bits sign_bit() const { return kSignBitMask & u_.bits_; }
 
-  // Returns true if this is NAN (not a number).
+  // Returns true iff this is NAN (not a number).
   bool is_nan() const {
     // It's a NAN if the exponent bits are all ones and the fraction
     // bits are not entirely zeros.
     return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);
   }
 
-  // Returns true if this number is at most kMaxUlps ULP's away from
+  // Returns true iff this number is at most kMaxUlps ULP's away from
   // rhs.  In particular, this function:
   //
   //   - returns false if either number is (or both are) NAN.
@@ -784,7 +784,7 @@ class GTEST_API_ Random {
 };
 
 // Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a
-// compiler error if T1 and T2 are different types.
+// compiler error iff T1 and T2 are different types.
 template <typename T1, typename T2>
 struct CompileAssertTypesEqual;
 
@@ -860,7 +860,7 @@ struct AddReference<T&> { typedef T& type; };  // NOLINT
     GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T))
 
 // ImplicitlyConvertible<From, To>::value is a compile-time bool
-// constant that's true if type From can be implicitly converted to
+// constant that's true iff type From can be implicitly converted to
 // type To.
 template <typename From, typename To>
 class ImplicitlyConvertible {
@@ -913,7 +913,7 @@ template <typename From, typename To>
 const bool ImplicitlyConvertible<From, To>::value;
 
 // IsAProtocolMessage<T>::value is a compile-time bool constant that's
-// true if T is type ProtocolMessage, proto2::Message, or a subclass
+// true iff T is type ProtocolMessage, proto2::Message, or a subclass
 // of those.
 template <typename T>
 struct IsAProtocolMessage
index 9d226e9e00cf6d075ce677337b32e3bed6973e71..58f6cafa75fb1f911858eca78e6466d92e26e029 100644 (file)
 # include <io.h>
 #endif
 
-// Defines this to true if Google Test can use POSIX regular expressions.
+// Defines this to true iff Google Test can use POSIX regular expressions.
 #ifndef GTEST_HAS_POSIX_RE
 # define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)
 #endif
 #  endif  // _HAS_EXCEPTIONS
 #  define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
 # elif defined(__GNUC__) && __EXCEPTIONS
-// gcc defines __EXCEPTIONS to 1 if exceptions are enabled.
+// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.
 #  define GTEST_HAS_EXCEPTIONS 1
 # elif defined(__SUNPRO_CC)
 // Sun Pro CC supports exceptions.  However, there is no compile-time way of
 // they are enabled unless the user tells us otherwise.
 #  define GTEST_HAS_EXCEPTIONS 1
 # elif defined(__IBMCPP__) && __EXCEPTIONS
-// xlC defines __EXCEPTIONS to 1 if exceptions are enabled.
+// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled.
 #  define GTEST_HAS_EXCEPTIONS 1
 # elif defined(__HP_aCC)
 // Exception handling is in effect by default in HP aCC compiler. It has to
 
 # ifdef _MSC_VER
 
-#  ifdef _CPPRTTI  // MSVC defines this macro if RTTI is enabled.
+#  ifdef _CPPRTTI  // MSVC defines this macro iff RTTI is enabled.
 #   define GTEST_HAS_RTTI 1
 #  else
 #   define GTEST_HAS_RTTI 0
 #  endif
 
-// Starting with version 4.3.2, gcc defines __GXX_RTTI if RTTI is enabled.
+// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled.
 # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302)
 
 #  ifdef __GXX_RTTI
@@ -832,9 +832,9 @@ class GTEST_API_ RE {
   // Returns the string representation of the regex.
   const char* pattern() const { return pattern_; }
 
-  // FullMatch(str, re) returns true if regular expression re matches
+  // FullMatch(str, re) returns true iff regular expression re matches
   // the entire str.
-  // PartialMatch(str, re) returns true if regular expression re
+  // PartialMatch(str, re) returns true iff regular expression re
   // matches a substring of str (including str itself).
   //
   // TODO(wan@google.com): make FullMatch() and PartialMatch() work
@@ -1181,7 +1181,7 @@ class ThreadWithParam : public ThreadWithParamBase {
   // When non-NULL, used to block execution until the controller thread
   // notifies.
   Notification* const thread_can_start_;
-  bool finished_;  // true if we know that the thread function has finished.
+  bool finished_;  // true iff we know that the thread function has finished.
   pthread_t thread_;  // The native thread object.
 
   GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);
index 396359137a94591643d191bfce3c399fbcebebf1..dc3a07be88029177a7ed17a76fdfe15ac1f4da11 100644 (file)
@@ -126,7 +126,7 @@ class GTEST_API_ String {
   static const char* Utf16ToAnsi(LPCWSTR utf16_str);
 #endif
 
-  // Compares two C strings.  Returns true if they have the same content.
+  // Compares two C strings.  Returns true iff they have the same content.
   //
   // Unlike strcmp(), this function can handle NULL argument(s).  A
   // NULL C string is considered different to any non-NULL C string,
@@ -143,7 +143,7 @@ class GTEST_API_ String {
   // the converted string in double quotes.
   static String ShowWideCStringQuoted(const wchar_t* wide_c_str);
 
-  // Compares two wide C strings.  Returns true if they have the same
+  // Compares two wide C strings.  Returns true iff they have the same
   // content.
   //
   // Unlike wcscmp(), this function can handle NULL argument(s).  A
@@ -151,7 +151,7 @@ class GTEST_API_ String {
   // including the empty string.
   static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);
 
-  // Compares two C strings, ignoring case.  Returns true if they
+  // Compares two C strings, ignoring case.  Returns true iff they
   // have the same content.
   //
   // Unlike strcasecmp(), this function can handle NULL argument(s).
@@ -160,7 +160,7 @@ class GTEST_API_ String {
   static bool CaseInsensitiveCStringEquals(const char* lhs,
                                            const char* rhs);
 
-  // Compares two wide C strings, ignoring case.  Returns true if they
+  // Compares two wide C strings, ignoring case.  Returns true iff they
   // have the same content.
   //
   // Unlike wcscasecmp(), this function can handle NULL argument(s).
@@ -237,7 +237,7 @@ class GTEST_API_ String {
   operator ::string() const { return ::string(c_str(), length()); }
 #endif  // GTEST_HAS_GLOBAL_STRING
 
-  // Returns true if this is an empty string (i.e. "").
+  // Returns true iff this is an empty string (i.e. "").
   bool empty() const { return (c_str() != NULL) && (length() == 0); }
 
   // Compares this with another String.
@@ -245,23 +245,23 @@ class GTEST_API_ String {
   // if this is greater than rhs.
   int Compare(const String& rhs) const;
 
-  // Returns true if this String equals the given C string.  A NULL
+  // Returns true iff this String equals the given C string.  A NULL
   // string and a non-NULL string are considered not equal.
   bool operator==(const char* a_c_str) const { return Compare(a_c_str) == 0; }
 
-  // Returns true if this String is less than the given String.  A
+  // Returns true iff this String is less than the given String.  A
   // NULL string is considered less than "".
   bool operator<(const String& rhs) const { return Compare(rhs) < 0; }
 
-  // Returns true if this String doesn't equal the given C string.  A NULL
+  // Returns true iff this String doesn't equal the given C string.  A NULL
   // string and a non-NULL string are considered not equal.
   bool operator!=(const char* a_c_str) const { return !(*this == a_c_str); }
 
-  // Returns true if this String ends with the given suffix.  *Any*
+  // Returns true iff this String ends with the given suffix.  *Any*
   // String is considered to end with a NULL or empty suffix.
   bool EndsWith(const char* suffix) const;
 
-  // Returns true if this String ends with the given suffix, not considering
+  // Returns true iff this String ends with the given suffix, not considering
   // case. Any String is considered to end with a NULL or empty suffix.
   bool EndsWithCaseInsensitive(const char* suffix) const;
 
index 6d52d43621749bd2b4acf1082bdb01019599b1ed..d1af50e18835a311c38a8dadb85a66acb59680b5 100644 (file)
@@ -135,7 +135,7 @@ struct AddRef<T&> { typedef T& type; };  // NOLINT
 template <int k> class Get;
 
 // A helper for implementing tuple_element<k, T>.  kIndexValid is true
-// if k < the number of fields in tuple type T.
+// iff k < the number of fields in tuple type T.
 template <bool kIndexValid, int kIndex, class Tuple>
 struct TupleElement;
 
index 77cc0f9edfbb66a6263ecaa70e6d3b9bbaf1752a..b7b01b0948ce6688ca21189ad5beb114b2a34402 100644 (file)
@@ -90,7 +90,7 @@ String GetTypeName() {
 
 #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
 
-// AssertyTypeEq<T1, T2>::type is defined if T1 and T2 are the same
+// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same
 // type.  This can be used as a compile-time assertion to ensure that
 // two types are equal.