UICommon: Rename HAS_LLVM to HAVE_LLVM

This commit is contained in:
Florent Castelli 2017-02-08 03:04:30 +01:00
parent f649e26655
commit 9ca4037ed9
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ if(ENABLE_LLVM)
find_package(LLVM CONFIG QUIET) find_package(LLVM CONFIG QUIET)
if(LLVM_FOUND) if(LLVM_FOUND)
message(STATUS "LLVM found, enabling LLVM support in disassembler") message(STATUS "LLVM found, enabling LLVM support in disassembler")
target_compile_definitions(uicommon PRIVATE HAS_LLVM) target_compile_definitions(uicommon PRIVATE HAVE_LLVM)
target_link_libraries(uicommon PRIVATE ${LLVM_AVAILABLE_LIBS}) target_link_libraries(uicommon PRIVATE ${LLVM_AVAILABLE_LIBS})
target_include_directories(uicommon PRIVATE ${LLVM_INCLUDE_DIRS}) target_include_directories(uicommon PRIVATE ${LLVM_INCLUDE_DIRS})
endif() endif()

View File

@ -1,6 +1,6 @@
#include <disasm.h> // Bochs #include <disasm.h> // Bochs
#if defined(HAS_LLVM) #if defined(HAVE_LLVM)
// PowerPC.h defines PC. // PowerPC.h defines PC.
// This conflicts with a function that has an argument named PC // This conflicts with a function that has an argument named PC
#undef PC #undef PC
@ -28,7 +28,7 @@ private:
u32* host_instructions_count, u64 starting_pc) override; u32* host_instructions_count, u64 starting_pc) override;
}; };
#if defined(HAS_LLVM) #if defined(HAVE_LLVM)
class HostDisassemblerLLVM : public HostDisassembler class HostDisassemblerLLVM : public HostDisassembler
{ {
public: public:
@ -153,7 +153,7 @@ std::string HostDisassemblerX86::DisassembleHostBlock(const u8* code_start, cons
HostDisassembler* GetNewDisassembler(const std::string& arch) HostDisassembler* GetNewDisassembler(const std::string& arch)
{ {
#if defined(HAS_LLVM) #if defined(HAVE_LLVM)
if (arch == "x86") if (arch == "x86")
return new HostDisassemblerLLVM("x86_64-none-unknown"); return new HostDisassemblerLLVM("x86_64-none-unknown");
else if (arch == "aarch64") else if (arch == "aarch64")