clang support

This commit is contained in:
MerryMage 2016-07-12 14:31:43 +01:00
parent 8449deb0bc
commit 619b451902
6 changed files with 5 additions and 6 deletions

View file

@ -6,7 +6,7 @@ option(DYNARMIC_USE_SYSTEM_BOOST "Use the system boost libraries" ON)
# Compiler flags # Compiler flags
if (NOT MSVC) if (NOT MSVC)
add_compile_options(--std=c++14 -Wall -Werror -Wextra -pedantic -Wfatal-errors -Wno-unused-parameter) add_compile_options(--std=c++14 -Wall -Werror -Wextra -pedantic -Wfatal-errors -Wno-unused-parameter -Wno-missing-braces)
if (ARCHITECTURE_x86_64) if (ARCHITECTURE_x86_64)
add_compile_options(-msse4.1) add_compile_options(-msse4.1)
endif() endif()

View file

@ -57,7 +57,7 @@ private:
} }
}; };
Jit::Jit(UserCallbacks callbacks) : callbacks(callbacks), impl(std::make_unique<Impl>(this, callbacks)) {} Jit::Jit(UserCallbacks callbacks) : impl(std::make_unique<Impl>(this, callbacks)) {}
Jit::~Jit() {} Jit::~Jit() {}

View file

@ -35,7 +35,7 @@ CodePtr Routines::RunCodeReturnAddress() const {
} }
void Routines::GenRunCode() { void Routines::GenRunCode() {
run_code = reinterpret_cast<RunCodeFuncType>(this->GetCodePtr()); run_code = reinterpret_cast<RunCodeFuncType>(const_cast<u8*>(this->GetCodePtr()));
// This serves two purposes: // This serves two purposes:
// 1. It saves all the registers we as a callee need to save. // 1. It saves all the registers we as a callee need to save.

View file

@ -46,7 +46,7 @@ void LogMessage(Class log_class, Level log_level,
_Printf_format_string_ _Printf_format_string_
#endif #endif
const char* format, ...) const char* format, ...)
#ifdef __GNUC__ #if defined(__GNUC__) && !defined(__clang__)
__attribute__((format(gnu_printf, 6, 7))) __attribute__((format(gnu_printf, 6, 7)))
#endif #endif
; ;

View file

@ -16,7 +16,7 @@ std::string StringFromFormat(
_Printf_format_string_ _Printf_format_string_
#endif #endif
const char* format, ...) const char* format, ...)
#ifdef __GNUC__ #if defined(__GNUC__) && !defined(__clang__)
__attribute__((format(gnu_printf, 1, 2))) __attribute__((format(gnu_printf, 1, 2)))
#endif #endif
; ;

View file

@ -78,7 +78,6 @@ public:
private: private:
bool halt_requested = false; bool halt_requested = false;
bool is_executing = false; bool is_executing = false;
Dynarmic::UserCallbacks callbacks;
struct Impl; struct Impl;
std::unique_ptr<Impl> impl; std::unique_ptr<Impl> impl;