[PATCH] D28596: [compiler-rt] General definition for weak functions.
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 20:53:28 PST 2017
kubabrecka added a comment.
>> Yes, what @zturner proposes works. @kubabrecka Would that make your editor work fine?
>> I would prefer to use only one macro as I defined it before, because if we use 2 macros, we always need to remember to include both.
>> But just let me know what you prefer and I will do that.
>
> The only way i can think to improve that is to make it so WEAK_ALIAS macro comes first, and make WEAK_DEF comes second and static_assert if WEAK_ALIAS has not been called (by using sizeof on the forward decl perhaps). This way you will get a compiler error if you don't do both.
>
> I don't even know if this would work (and i also don't think it should hold up this change regardless since it's only a minor improvement).
>
> That said, I'm fine with any approach that works, so I'll leave it up kuba@ and aizatsky@ to decide which they like better
Both solutions work by me.
What about FreeBSD? It hasn't been mentioned in this thread.
https://reviews.llvm.org/D28596
More information about the llvm-commits
mailing list