[llvm-commits] CVS: llvm/include/llvm/Constants.h

Chris Lattner clattner at apple.com
Thu Mar 1 14:46:12 PST 2007


On Mar 1, 2007, at 1:50 PM, Reid Spencer wrote:
> Index: llvm/include/llvm/Constants.h
> diff -u llvm/include/llvm/Constants.h:1.135 llvm/include/llvm/ 
> Constants.h:1.136
> --- llvm/include/llvm/Constants.h:1.135	Thu Mar  1 13:30:07 2007
> +++ llvm/include/llvm/Constants.h	Thu Mar  1 15:50:41 2007
> @@ -127,6 +127,13 @@
> +  /// This is just a convenience method to make client code  
> smaller for a
> +  /// common case.
> +  /// @brief Determine if the value is one.
> +  virtual bool isUnitValue() const {
> +    return Val == 1;
> +  }

Why is this virtual?  How about "isOne()" or something?

-Chris



More information about the llvm-commits mailing list