aaron.ballman added a comment.

In D124462#3480219 <https://reviews.llvm.org/D124462#3480219>, @steakhal wrote:

> Thanks for the stats.
> @aaron.ballman WDYT, where should we put the `LLVM_DUMP_METHOD` ?

The documentation for the attribute says function definitions, but I don't 
think it matters in terms of the semantics of the attributes. I'd probably put 
it on the definition in this case because the goal is to keep the function 
around at runtime but it doesn't impact the interface of the call or how users 
would use it at compile time.

I noticed that we seem to be pretty bad about this advice however:

  /// Note that you should also surround dump() functions with
  /// `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` so they do always
  /// get stripped in release builds.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124462

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to