[llvm] r278170 - Add a platform independent version of __PRETTY_FUNCTION__.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 15:17:22 PDT 2016


__GNUC__ will be defined for GCC but __clang__ will not, right?

On Wed, Aug 10, 2016 at 11:52 AM Joerg Sonnenberger via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Tue, Aug 09, 2016 at 10:57:06PM +0000, Zachary Turner via llvm-commits
> wrote:
> > How does this look?
> >
> > #if defined(_MSC_VER)
> > #define LLVM_PRETTY_FUNCTION __FUNCSIG__
> > #elif defined(__GNUC__) || defined(__clang__)
> > #define LLVM_PRETTY_FUNCTION __PRETTY_FUNCTION__
> > #else
> > #define LLVM_PRETTY_FUNCTION __func__
> > #endif
>
> The || defined(__clang__) is redundant, isn't it?
>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160810/25229c55/attachment.html>


More information about the llvm-commits mailing list