[PATCH] D28596: [compiler-rt] General definition for weak functions.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 22:25:30 PST 2017
Fwiw, gtest does this as well, so it's not entirely without precedent
On Tue, Jan 17, 2017 at 10:05 PM Kuba (Brecka) Mracek via Phabricator <
reviews at reviews.llvm.org> wrote:
> 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...:
>
> WHATEVER_MACROS_NECESSARY
> void fun() MAYBE_OTHER_MACROS {
> ...code...
> }
>
> ?
>
>
> https://reviews.llvm.org/D28596
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170118/892fd1c9/attachment.html>
More information about the llvm-commits
mailing list