[llvm-commits] CVS: llvm/include/llvm/Analysis/DSNode.h

Alkis Evlogimenos alkis at evlogimenos.com
Sat Feb 7 16:59:01 PST 2004


On Saturday 07 February 2004 04:54 pm, Chris Lattner wrote:
> Changes in directory llvm/include/llvm/Analysis:
>
> DSNode.h updated: 1.35 -> 1.36
>
> ---
> Log message:
>
> As Alkis pointed out to me, I forgot to commit this... :(
>
>
> ---
> Diffs of the changes:  (+4 -0)
>
> Index: llvm/include/llvm/Analysis/DSNode.h
> diff -u llvm/include/llvm/Analysis/DSNode.h:1.35
> llvm/include/llvm/Analysis/DSNode.h:1.36 ---
> llvm/include/llvm/Analysis/DSNode.h:1.35	Tue Jan 27 15:49:25 2004 +++
> llvm/include/llvm/Analysis/DSNode.h	Sat Feb  7 16:54:19 2004
> @@ -152,6 +152,10 @@
>    /// getForwardNode - This method returns the node that this node is
> forwarded /// to, if any.
>    DSNode *getForwardNode() const { return ForwardNH.getNode(); }
> +
> +  /// isForwarding - Return true if this node is forwarding to another.
> +  bool isForwarding() const { return !ForwardNH.isNull(); }
> +
>    void stopForwarding() {
>      assert(!ForwardNH.isNull() &&
>             "Node isn't forwarding, cannot stopForwarding!");

The above would read better as:

    void stopForwarding() {
      assert(isForwarding() &&
             "Node isn't forwarding, cannot stopForwarding!");

don't you think?

-- 

Alkis



More information about the llvm-commits mailing list