Bug 1193459: Fix JS_DEPENDENT_TEMPLATE_HINT for clang-cl. r=jimb

This commit is contained in:
David Major 2015-08-12 13:25:40 -04:00
parent 5568a93efb
commit 9d0ba1911f
2 changed files with 5 additions and 3 deletions

View File

@ -98,7 +98,9 @@ JS_FOR_EACH_TRACEKIND(JS_EXPAND_DEF);
// GCC and Clang require an explicit template declaration in front of the
// specialization of operator() because it is a dependent template. MSVC, on
// the other hand, gets very confused if we have a |template| token there.
#ifdef _MSC_VER
// The clang-cl front end defines _MSC_VER, but still requires the explicit
// template declaration, so we must test for __clang__ here as well.
#if defined(_MSC_VER) && !defined(__clang__)
# define JS_DEPENDENT_TEMPLATE_HINT
#else
# define JS_DEPENDENT_TEMPLATE_HINT template

View File

@ -583,8 +583,8 @@ CopyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* dst, JSObject* src,
// Dispatch to specialized methods based on the type of an object.
/////////////////////////////////////////////////////////////////////
// Goop to fix MSVC. See CallTyped in jsgc.h.
#ifdef _MSC_VER
// Goop to fix MSVC. See DispatchTraceKindTyped in TraceKind.h.
#if defined(_MSC_VER) && !defined(__clang__)
# define DEPENDENT_TEMPLATE_HINT
#else
# define DEPENDENT_TEMPLATE_HINT template