зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1314762 - move #includes of system-y headers out of anonymous namespace in SSE.cpp; r=erahm
#include'ing system headers inside anonymous namespaces seems to work OK with GCC and MSVC, but it does not work well with clang-cl in some compilation modes. Moving them out of the anonymous namespace makes everybody happy. MozReview-Commit-ID: K8AkYZEznzm --HG-- extra : rebase_source : fe0dc2498253dab96c0f1b03a051d7e347fb13af
This commit is contained in:
Родитель
8f6319bbcd
Коммит
014c62a607
|
@ -7,6 +7,14 @@
|
|||
|
||||
#include "SSE.h"
|
||||
|
||||
#ifdef HAVE_CPUID_H
|
||||
// cpuid.h is available on gcc 4.3 and higher on i386 and x86_64
|
||||
#include <cpuid.h>
|
||||
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))
|
||||
// MSVC 2005 or newer on x86-32 or x86-64
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
// SSE.h has parallel #ifs which declare MOZILLA_SSE_HAVE_CPUID_DETECTION.
|
||||
|
@ -16,9 +24,6 @@ namespace {
|
|||
|
||||
#ifdef HAVE_CPUID_H
|
||||
|
||||
// cpuid.h is available on gcc 4.3 and higher on i386 and x86_64
|
||||
#include <cpuid.h>
|
||||
|
||||
enum CPUIDRegister { eax = 0, ebx = 1, ecx = 2, edx = 3 };
|
||||
|
||||
static bool
|
||||
|
@ -45,9 +50,6 @@ static uint64_t xgetbv(uint32_t xcr) {
|
|||
|
||||
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))
|
||||
|
||||
// MSVC 2005 or newer on x86-32 or x86-64
|
||||
#include <intrin.h>
|
||||
|
||||
enum CPUIDRegister { eax = 0, ebx = 1, ecx = 2, edx = 3 };
|
||||
|
||||
static bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче