build(deps): Initial support for LLVM-18 (#1773)

Signed-off-by: مهدي شينون (Mehdi Chinoune) <mehdi.chinoune@hotmail.com>
This commit is contained in:
مهدي شينون (Mehdi Chinoune)
2024-02-24 11:44:26 -08:00
committed by GitHub
parent 77ceebb335
commit bdf9f24f2a
4 changed files with 15 additions and 3 deletions
+1 -1
View File
@@ -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}")
+5 -1
View File
@@ -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>
+4
View File
@@ -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);
+5 -1
View File
@@ -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>