mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
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.
This commit is contained in:
17
Source/Core/Common/Compiler.h
Normal file
17
Source/Core/Common/Compiler.h
Normal file
@ -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
|
Reference in New Issue
Block a user