Author: djg Date: Mon Oct 1 11:01:23 2007 New Revision: 42487 URL: http://llvm.org/viewvc/llvm-project?rev=42487&view=rev Log: Add empty() member functions to a few container-like classes.
Modified: llvm/trunk/include/llvm/Analysis/CallGraph.h llvm/trunk/include/llvm/Analysis/LoopInfo.h llvm/trunk/include/llvm/Support/CallSite.h Modified: llvm/trunk/include/llvm/Analysis/CallGraph.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/CallGraph.h?rev=42487&r1=42486&r2=42487&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/CallGraph.h (original) +++ llvm/trunk/include/llvm/Analysis/CallGraph.h Mon Oct 1 11:01:23 2007 @@ -189,6 +189,7 @@ inline iterator end() { return CalledFunctions.end(); } inline const_iterator begin() const { return CalledFunctions.begin(); } inline const_iterator end() const { return CalledFunctions.end(); } + inline bool empty() const { return CalledFunctions.empty(); } inline unsigned size() const { return CalledFunctions.size(); } // Subscripting operator - Return the i'th called function... Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=42487&r1=42486&r2=42487&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original) +++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Mon Oct 1 11:01:23 2007 @@ -79,6 +79,7 @@ typedef std::vector<Loop*>::const_iterator iterator; iterator begin() const { return SubLoops.begin(); } iterator end() const { return SubLoops.end(); } + bool empty() const { return SubLoops.empty(); } /// getBlocks - Get a list of the basic blocks which make up this loop. /// Modified: llvm/trunk/include/llvm/Support/CallSite.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CallSite.h?rev=42487&r1=42486&r2=42487&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/CallSite.h (original) +++ llvm/trunk/include/llvm/Support/CallSite.h Mon Oct 1 11:01:23 2007 @@ -110,6 +110,7 @@ return I->op_begin()+3; // Skip Function, BB, BB } arg_iterator arg_end() const { return I->op_end(); } + bool arg_empty() const { return arg_end() == arg_begin(); } unsigned arg_size() const { return unsigned(arg_end() - arg_begin()); } bool operator<(const CallSite &CS) const { _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits