Add missing includes where headers depend on other headers having been included first.

This is good hygiene, and also happens to be required to build Dolphin
using Clang modules.

(Under this setup, each header file becomes a module, and each #include
is automatically translated to a module import.  Recursive includes
still leak through (by default), but modules are compiled independently,
and can't depend on defines or types having previously been set up.  The
main reason to retrofit it onto Dolphin is compilation performance - no
more textual includes whatsoever, rather than putting a few blessed
common headers into a PCH.  Unfortunately, I found multiple Clang bugs
while trying to build Dolphin this way, so it's not ready yet, but I can
start with this prerequisite.)
This commit is contained in:
comex committed 2014-10-21 21:22:16 -04:00
1 parent 78deebd732
commit 6e774f1b64
50 files changed
+90 -7

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
// Refer to the license.txt file included.
#include "scmrev.h"
#include "Common/CommonTypes.h"
#include "Common/Common.h"
#ifdef _DEBUG
#define BUILD_TYPE_STR "Debug "
+2
View File
@@ -4,6 +4,8 @@
#pragma once
#include "Common/CommonTypes.h"
u16 dsp_read_accelerator();
u16 dsp_read_aram_d3();
+1 -1
View File
@@ -4,7 +4,7 @@
#pragma once
#include "Common/CommonTypes.h"
#include "Common/Common.h"
// super fast breakpoints for a limited range.
// To be used interchangeably with the BreakPoints class.
+4
View File
@@ -4,6 +4,10 @@
#pragma once
#include <string>
#include "Common/CommonTypes.h"
// The user of the DSPCore library must supply a few functions so that the
// emulation core can access the environment it runs in. If the emulation
// core isn't used, for example in an asm/disasm tool, then most of these
@@ -4,6 +4,8 @@
#pragma once
#include "Common/CommonTypes.h"
struct PBMixer
{
u16 left;
+2
View File
@@ -4,5 +4,7 @@
#pragma once
#include "Common/CommonTypes.h"
bool DumpDSPCode(const u8 *code_be, int size_in_bytes, u32 crc);
bool DumpCWCode(u32 _Address, u32 _Length);
+2
View File
@@ -4,6 +4,8 @@
#pragma once
#include "Core/HW/EXI_Device.h"
class CEXIAD16 : public IEXIDevice
{
public:
@@ -4,6 +4,8 @@
#pragma once
#include "Core/HW/EXI_Device.h"
class CEXIAMBaseboard : public IEXIDevice
{
public:
+1
View File
@@ -9,6 +9,7 @@
#endif
#include "Common/Thread.h"
#include "Core/HW/EXI_Device.h"
// Network Control Register A
enum NCRA
+2
View File
@@ -11,6 +11,8 @@
#include "Common/Thread.h"
#include "Core/HW/EXI_Device.h"
class GeckoSockServer
: public sf::SocketTCP
{
@@ -4,6 +4,7 @@
#pragma once
#include "Common/StdMakeUnique.h"
#include "Core/HW/EXI_Device.h"
class MemoryCardBase;
class CEXIMemoryCard : public IEXIDevice
+2
View File
@@ -4,6 +4,8 @@
#pragma once
#include "Core/HW/EXI_Device.h"
#if HAVE_PORTAUDIO
#include <mutex>
+1
View File
@@ -5,6 +5,7 @@
#pragma once
#include "Core/HW/GCMemcard.h"
#include "DiscIO/Volume.h"
// Uncomment this to write the system data of the memorycard from directory to disc
//#define _WRITE_MC_HEADER 1
+1 -1
View File
@@ -7,7 +7,7 @@
#include <functional>
#include <memory>
#include "Common/CommonTypes.h"
#include "Common/Common.h"
// All the templated and very repetitive MMIO-related code is isolated in this
// file for easier reading. It mostly contains code related to handling methods
+1
View File
@@ -6,6 +6,7 @@
#include <string>
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
// Enable memory checks in the Debug/DebugFast builds, but NOT in release
@@ -4,6 +4,8 @@
#pragma once
#include "Core/HW/SI_Device.h"
// triforce (GC-AM) baseboard
class CSIDevice_AMBaseboard : public ISIDevice
{
+2
View File
@@ -4,6 +4,8 @@
#pragma once
#include "Core/HW/SI_Device.h"
#include "SFML/Network.hpp"
// GameBoy Advance "Link Cable"
@@ -6,6 +6,8 @@
#pragma once
#include "Common/CommonTypes.h"
// The key structure to use with WiimoteGenerateKey()
struct wiimote_key
{
+4
View File
@@ -4,6 +4,10 @@
#pragma once
#include <string>
#include "Common/CommonTypes.h"
class IWII_IPC_HLE_Device;
class PointerWrap;
@@ -4,6 +4,8 @@
#pragma once
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
class CWII_IPC_HLE_Device_usb_kbd : public IWII_IPC_HLE_Device
{
public:
@@ -6,6 +6,8 @@
#include <map>
#include <string>
#include "Common/Common.h"
#include "Core/IPC_HLE/hci.h"
class CWII_IPC_HLE_Device_usb_oh1_57e_305;
@@ -4,6 +4,8 @@
#pragma once
#include "Common/CommonTypes.h"
#if 0
struct SAttrib
{
+1
View File
@@ -2388,6 +2388,7 @@ struct btreq {
//////////////////////////////////////////////////////////////////////////
// Dolphin-custom structs (to kill)
//////////////////////////////////////////////////////////////////////////
#include "Common/CommonTypes.h"
struct SCommandMessage
{
u16 Opcode;
@@ -8,6 +8,7 @@
#include <cinttypes>
#include "Common/x64Emitter.h"
#include "Core/PowerPC/PPCAnalyst.h"
enum FlushMode
{
@@ -37,6 +37,10 @@
#error No context definition for OS
#endif
#elif defined(__APPLE__) && !defined(USE_SIGACTION_ON_APPLE)
// for modules:
#define _XOPEN_SOURCE
#include <ucontext.h>
#include <mach/mach.h>
#include <mach/message.h>
#if _M_X86_64
@@ -4,6 +4,8 @@
#pragma once
#include <unordered_map>
#include "Common/CommonTypes.h"
#include "Common/x64Analyzer.h"
#include "Common/x64Emitter.h"
+2
View File
@@ -7,6 +7,8 @@
#include <string>
#include "Common/CommonTypes.h"
#ifdef _WIN32
#define PROFILER_QUERY_PERFORMANCE_COUNTER(pt) \
+2
View File
@@ -10,6 +10,8 @@
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
namespace State
{
+1 -1
View File
@@ -24,7 +24,7 @@
#pragma once
#include "Common/CommonTypes.h"
#include "Common/Common.h"
void get_ng_cert(u8* ng_cert_out, u32 NG_id, u32 NG_key_id, const u8* NG_priv, const u8* NG_sig);
void get_ap_sig_and_cert(u8 *sig_out, u8 *ap_cert_out, u64 title_id, u8 *data, u32 data_size, const u8 *NG_priv, u32 NG_id);
+2 -1
View File
@@ -7,11 +7,12 @@
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
#include "Common/Common.h"
#include "DiscIO/Volume.h"
#if defined(HAVE_WX) && HAVE_WX
#include <wx/image.h>
#include <wx/bitmap.h>
#endif
class PointerWrap;
@@ -305,3 +305,4 @@ void LogConfigWindow::OnLogCheck(wxCommandEvent& event)
int i = event.GetInt();
ToggleLog(i, m_checks->IsChecked(i));
}
@@ -12,10 +12,13 @@
#pragma once
#include <atomic>
typedef LONG* LPLONG; // Missing type for ForceFeedback.h
#include <CoreFoundation/CoreFoundation.h>
#include <ForceFeedback/ForceFeedback.h>
#include "DirectInputConstants.h" // Not stricty necessary
#include "Common/CommonTypes.h" // for LONG
namespace ciface
{
@@ -4,6 +4,8 @@
#include <string>
#include "Common/CommonTypes.h"
#include "VideoBackends/OGL/GLExtensions/ARB_blend_func_extended.h"
#include "VideoBackends/OGL/GLExtensions/ARB_buffer_storage.h"
#include "VideoBackends/OGL/GLExtensions/ARB_debug_output.h"
@@ -1,6 +1,8 @@
#pragma once
#include <array>
#include "VideoBackends/OGL/GLExtensions/GLExtensions.h"
#include "VideoCommon/PerfQueryBase.h"
namespace OGL
@@ -8,6 +8,7 @@
#include <unordered_map>
#include "VideoBackends/OGL/GLUtil.h"
#include "VideoBackends/OGL/ProgramShaderCache.h"
#include "VideoCommon/PostProcessing.h"
#include "VideoCommon/VideoCommon.h"
@@ -6,6 +6,8 @@
#include <string>
#include "Common/CommonTypes.h"
namespace OGL
{
@@ -4,7 +4,9 @@
#pragma once
#include "VideoBackends/OGL/GLExtensions/GLExtensions.h"
#include "VideoCommon/CPMemory.h"
#include "VideoCommon/NativeVertexFormat.h"
#include "VideoCommon/VertexManagerBase.h"
namespace OGL
@@ -4,6 +4,8 @@
#pragma once
#include "Common/Common.h"
namespace DebugUtil
{
void Init();
@@ -6,6 +6,7 @@
#include "Common/CommonTypes.h"
#include "VideoBackends/Software/CPMemLoader.h"
#include "VideoBackends/Software/NativeVertexFormat.h"
#include "VideoBackends/Software/SetupUnit.h"
#include "VideoBackends/Software/SWStatistics.h"
#include "VideoBackends/Software/SWVertexLoader.h"
@@ -5,7 +5,7 @@
#include <algorithm>
#include <cmath>
#include "Common/CommonFuncs.h"
#include "Common/Common.h"
#include "Core/HW/Memmap.h"
#include "VideoBackends/Software/BPMemLoader.h"
#include "VideoBackends/Software/TextureSampler.h"
@@ -4,6 +4,8 @@
#pragma once
#include "Common/CommonTypes.h"
// all constant buffer attributes must be 16 bytes aligned, so this are the only allowed components:
typedef float float4[4];
typedef u32 uint4[4];
+1
View File
@@ -4,6 +4,7 @@
#pragma once
#include "Common/Common.h"
#include "VideoCommon/VertexManagerBase.h"
extern u8* g_video_buffer_read_ptr;
@@ -4,6 +4,9 @@
#pragma once
#include <functional> // for hash
#include "Common/Common.h"
#include "Common/Hash.h"
// m_components
@@ -7,6 +7,8 @@
#include <functional>
#include <string>
#include "Common/CommonTypes.h"
namespace OSD
{
// On-screen message display
+2
View File
@@ -4,6 +4,8 @@
#pragma once
#include "Common/CommonTypes.h"
#define GX_NOP 0x00
#define GX_LOAD_BP_REG 0x61
+1
View File
@@ -4,6 +4,7 @@
#pragma once
#include "Common/Common.h"
#include "Common/Hash.h"
enum
@@ -4,6 +4,8 @@
#pragma once
#include "VideoCommon/NativeVertexFormat.h"
void LOADERDECL Color_ReadDirect_24b_888();
void LOADERDECL Color_ReadDirect_32b_888x();
void LOADERDECL Color_ReadDirect_16b_565();
@@ -4,7 +4,7 @@
#pragma once
#include "Common/CommonTypes.h"
#include "VideoCommon/NativeVertexFormat.h"
class VertexLoader_Normal
{
@@ -4,6 +4,8 @@
#pragma once
#include "VideoCommon/NativeVertexFormat.h"
class VertexLoader_Position {
public:
@@ -1,6 +1,7 @@
#pragma once
#include <vector>
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
class NativeVertexFormat;