Skip to content

Commit 9b3ed78

Browse files
MehdiChinounelgritz
authored andcommitted
build(deps): Initial support for LLVM-18 (#1773)
Signed-off-by: مهدي شينون (Mehdi Chinoune) <[email protected]>
1 parent a49f8e0 commit 9b3ed78

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/liboslcomp/oslcomp.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
#include <clang/Frontend/TextDiagnosticPrinter.h>
2727
#include <clang/Frontend/Utils.h>
2828
#include <clang/Lex/PreprocessorOptions.h>
29-
#include <llvm/Support/Host.h>
29+
#if OSL_LLVM_VERSION < 160
30+
# include <llvm/Support/Host.h>
31+
#else
32+
# include <llvm/TargetParser/Host.h>
33+
#endif
3034
#include <llvm/Support/MemoryBuffer.h>
3135
#include <llvm/Support/ToolOutputFile.h>
3236
#include <llvm/Support/raw_ostream.h>

src/liboslexec/llvm_passes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,11 @@ template<int WidthT> class PreventBitMasksFromBeingLiveinsToBasicBlocks {
349349
// Should handle promoting whatever the constant value is (most likely zeroinitializer)
350350
llvm::ConstantFolder Folder;
351351
auto* signExtConstant
352+
#if OSL_LLVM_VERSION < 180
352353
= Folder.CreateCast(
354+
#else
355+
= Folder.FoldCast(
356+
#endif
353357
llvm::Instruction::SExt,
354358
constant, m_native_mask_type);
355359

src/liboslexec/llvm_util.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@
4545
#include <llvm/Support/CommandLine.h>
4646
#include <llvm/Support/ErrorOr.h>
4747
#include <llvm/Support/FileSystem.h>
48-
#include <llvm/Support/Host.h>
48+
#if OSL_LLVM_VERSION < 160
49+
# include <llvm/Support/Host.h>
50+
#else
51+
# include <llvm/TargetParser/Host.h>
52+
#endif
4953
#include <llvm/Support/raw_os_ostream.h>
5054
#if OSL_LLVM_VERSION < 140
5155
# include <llvm/Support/TargetRegistry.h>

0 commit comments

Comments
 (0)