build(deps): Initial support for LLVM-18 (#1773)
Signed-off-by: مهدي شينون (Mehdi Chinoune) <mehdi.chinoune@hotmail.com>
This commit is contained in:
@@ -117,7 +117,7 @@ checked_find_package (pugixml REQUIRED
|
||||
# LLVM library setup
|
||||
checked_find_package (LLVM REQUIRED
|
||||
VERSION_MIN 9.0
|
||||
VERSION_MAX 17.9
|
||||
VERSION_MAX 18.9
|
||||
PRINT LLVM_SYSTEM_LIBRARIES CLANG_LIBRARIES)
|
||||
# ensure include directory is added (in case of non-standard locations
|
||||
include_directories (BEFORE SYSTEM "${LLVM_INCLUDES}")
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
#include <clang/Frontend/TextDiagnosticPrinter.h>
|
||||
#include <clang/Frontend/Utils.h>
|
||||
#include <clang/Lex/PreprocessorOptions.h>
|
||||
#include <llvm/Support/Host.h>
|
||||
#if OSL_LLVM_VERSION < 160
|
||||
# include <llvm/Support/Host.h>
|
||||
#else
|
||||
# include <llvm/TargetParser/Host.h>
|
||||
#endif
|
||||
#include <llvm/Support/MemoryBuffer.h>
|
||||
#include <llvm/Support/ToolOutputFile.h>
|
||||
#include <llvm/Support/raw_ostream.h>
|
||||
|
||||
@@ -349,7 +349,11 @@ public:
|
||||
// Should handle promoting whatever the constant value is (most likely zeroinitializer)
|
||||
llvm::ConstantFolder Folder;
|
||||
auto* signExtConstant
|
||||
#if OSL_LLVM_VERSION < 180
|
||||
= Folder.CreateCast(
|
||||
#else
|
||||
= Folder.FoldCast(
|
||||
#endif
|
||||
llvm::Instruction::SExt,
|
||||
constant, m_native_mask_type);
|
||||
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
#include <llvm/Support/CommandLine.h>
|
||||
#include <llvm/Support/ErrorOr.h>
|
||||
#include <llvm/Support/FileSystem.h>
|
||||
#include <llvm/Support/Host.h>
|
||||
#if OSL_LLVM_VERSION < 160
|
||||
# include <llvm/Support/Host.h>
|
||||
#else
|
||||
# include <llvm/TargetParser/Host.h>
|
||||
#endif
|
||||
#include <llvm/Support/raw_os_ostream.h>
|
||||
#if OSL_LLVM_VERSION < 140
|
||||
# include <llvm/Support/TargetRegistry.h>
|
||||
|
||||
Reference in New Issue
Block a user