[PATCH] D28596: [compiler-rt] General definition for weak functions.

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 22:05:49 PST 2017

kubabrecka added a comment.

> To avoid duplicated code, I will define a macro WEAK_DEF(), so we can reduce that code to:
>   WEAK_DEF(void, fun, ()) {
>     // Default implementation
>   }
> Would you agree on this point? Would you do it differently?

I don't like that this is not a "standard" function declaration.  It's not obvious that this declares a function.  My editor/IDE will not recognize this as a function, and "Go to definition" and such will not work.  Is there really no way of keeping the syntax of...:

  void fun() MAYBE_OTHER_MACROS {



More information about the llvm-commits mailing list