[PATCH] D30154: MemorySSA: Add support for renaming uses in the updater.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 18 22:30:28 PST 2017


On Sat, Feb 18, 2017 at 10:25 PM, Davide Italiano via Phabricator <
reviews at reviews.llvm.org> wrote:

> davide added inline comments.
>
>
> ================
> Comment at: lib/Transforms/Utils/MemorySSA.cpp:1915-1916
>  #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
> -LLVM_DUMP_METHOD void MemorySSA::dump() const {
> -  print(dbgs());
> -}
> +LLVM_DUMP_METHOD void MemorySSA::dump() const { print(dbgs()); }
>  #endif
>
> ----------------
> unrelated formatting I think (also I think the `#if` is redundant if you
> mark `dump()` as `LLVM_DUMP_METHOD`?)
>
>
Matthias added these (though i'm to blame for clang-formatting it) in
r293359
His commit message says:

 - Public headers should just declare the dump() method but not use
      LLVM_DUMP_METHOD or #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
    - The definition of a dump method should look like this:
      #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
      LLVM_DUMP_METHOD void MyClass::dump() {
        // print stuff to dbgs()...
      }
      #endif



> https://reviews.llvm.org/D30154
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170218/ad2b163f/attachment.html>


More information about the llvm-commits mailing list