Commit 412928c4 authored by Uladzislau Paulovich's avatar Uladzislau Paulovich Committed by Facebook Github Bot

folly | Improve support for clang-cl compiler in folly/Portability.h

Summary: `clang-cl` on Windows also defines `__PRETTY_FUNCTION__` which has a format different from `__FUNCSIG__`. Therefore folly breaks users of this macro. Alias should be defined only when "real" MSVC compiler is used.

Reviewed By: akrieger, Orvid, blackm00n

Differential Revision: D17094657

fbshipit-source-id: 4b191a61201704382e6b6e178bcc1c673511c537
parent 464fac7e
......@@ -250,10 +250,6 @@ constexpr bool kIsSanitize = false;
#ifdef _MSC_VER
#include <folly/portability/SysTypes.h>
// compiler specific to compiler specific
// nolint
#define __PRETTY_FUNCTION__ __FUNCSIG__
// Hide a GCC specific thing that breaks MSVC if left alone.
#define __extension__
......@@ -265,6 +261,9 @@ constexpr bool kIsSanitize = false;
// So cannot unconditionally define __SSE4_2__ in clang.
#ifndef __clang__
#define __SSE4_2__ 1
// compiler specific to compiler specific
// nolint
#define __PRETTY_FUNCTION__ __FUNCSIG__
#endif
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment