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
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)
add_compile_options(-msse4.1)
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() {}

View file

@ -35,7 +35,7 @@ CodePtr Routines::RunCodeReturnAddress() const {
}
void Routines::GenRunCode() {
run_code = reinterpret_cast<RunCodeFuncType>(this->GetCodePtr());
run_code = reinterpret_cast<RunCodeFuncType>(const_cast<u8*>(this->GetCodePtr()));
// This serves two purposes:
// 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_
#endif
const char* format, ...)
#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__clang__)
__attribute__((format(gnu_printf, 6, 7)))
#endif
;

View file

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

View file

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