Permalink
Browse files

Common: Add header for compiler-specifics

Instead of globbing things under an ambiguous Common.h header, move
compiler-specifics over to Compiler.h. This gives us a dedicated home
for anything related to compilers that we want to make functional across
all compilers that we support.

This moves us a little closer to eliminating Common.h entirely.
  • Loading branch information...
lioncash committed Jun 9, 2018
1 parent 1d87584 commit 03414e8e848fd99e2ea83f4466a1cf34c2ad6807
@@ -35,7 +35,7 @@
#include <limits>
#include <type_traits>
#include "Common.h"
#include "Common/Compiler.h"
/*
* Abstract bitfield class
@@ -26,8 +26,8 @@
#include <vector>
#include "Common/Assert.h"
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Compiler.h"
#include "Common/File.h"
#include "Common/FileUtil.h"
#include "Common/Flag.h"
@@ -4,14 +4,6 @@
#pragma once
#if defined(__GNUC__) || __clang__
// Disable "unused function" warnings for the ones manually marked as such.
#define UNUSED __attribute__((unused))
#else
// Not sure MSVC even checks this...
#define UNUSED
#endif
#if defined _WIN32
// Memory leak checks
@@ -42,8 +34,6 @@ struct CrtDebugBreak
#ifndef _WIN32
#include <limits.h>
#define MAX_PATH PATH_MAX
#define __forceinline inline __attribute__((always_inline))
#endif
#ifdef _MSC_VER
@@ -54,6 +54,7 @@
<ClInclude Include="CommonFuncs.h" />
<ClInclude Include="CommonPaths.h" />
<ClInclude Include="CommonTypes.h" />
<ClInclude Include="Compiler.h" />
<ClInclude Include="Config\Config.h" />
<ClInclude Include="Config\ConfigInfo.h" />
<ClInclude Include="Config\Enums.h" />
@@ -37,6 +37,7 @@
<ClInclude Include="CommonFuncs.h" />
<ClInclude Include="CommonPaths.h" />
<ClInclude Include="CommonTypes.h" />
<ClInclude Include="Compiler.h" />
<ClInclude Include="Config\Config.h" />
<ClInclude Include="Config\Enums.h" />
<ClInclude Include="Config\Layer.h" />
@@ -0,0 +1,17 @@
// Copyright 2018 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#if defined(__GNUC__) || __clang__
// Disable "unused function" warnings for the ones manually marked as such.
#define UNUSED __attribute__((unused))
#else
// Not sure MSVC even checks this...
#define UNUSED
#endif
#ifndef _WIN32
#define __forceinline inline __attribute__((always_inline))
#endif
@@ -7,12 +7,9 @@
// http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <string.h>
#include <cstring>
#include "Common/Common.h"
#include "Common/Compiler.h"
#include "Common/Crypto/bn.h"
#include "Common/Crypto/ec.h"
#include "Common/Random.h"
@@ -8,8 +8,8 @@
#include <array>
#include <cstring>
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Compiler.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
#include "InputCommon/ControllerEmu/ControlGroup/Extension.h"
@@ -9,6 +9,7 @@
#include "Common/BitField.h"
#include "Common/CommonTypes.h"
#include "Common/Compiler.h"
enum class EFBCopyFormat;
@@ -6,8 +6,8 @@
#include <cstring>
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Compiler.h"
#include "Common/Swap.h"
class DataReader
@@ -4,8 +4,8 @@
#include <cstddef>
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Compiler.h"
#include "Common/Logging/Log.h"
#include "VideoCommon/IndexGenerator.h"
#include "VideoCommon/OpcodeDecoding.h"
@@ -6,8 +6,8 @@
#include <cstring>
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Compiler.h"
extern u8* g_video_buffer_read_ptr;
extern u8* g_vertex_manager_write_ptr;
@@ -7,8 +7,8 @@
#include <cmath>
#include <type_traits>
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Compiler.h"
#include "VideoCommon/DataReader.h"
#include "VideoCommon/VertexLoader.h"

0 comments on commit 03414e8

Please sign in to comment.