[PATCH] D77386: [Alignment][NFC] Allow to print alignment to raw_ostream

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 06:57:29 PDT 2020


gchatelet abandoned this revision.
gchatelet added a comment.

In D77386#1959463 <https://reviews.llvm.org/D77386#1959463>, @courbet wrote:

> I'd rather have every user forced to think whether they want to use the value or its internal (log) representation, e.g. `.p2align` vs MIR format. If only for debug, then:
>
>   #ifndef NDEBUG
>   std::string Align::DebugStr() const {
>     return "Align(" + value + ")";
>   }
>   #endif
>
>
> WDYT ?


Sounds good to me, I was not absolutely convinced either.
The main motivation was indeed debugging for upcoming patches. I think it's better to resort on a `DebugStr` function then.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77386/new/

https://reviews.llvm.org/D77386





More information about the llvm-commits mailing list