Skip to content

Commit ded5db5

Browse files
authored
[SYCL][Fusion] Remove LLVM include from header (#8017)
Remove includes of LLVM headers from the public surface of the JIT compiler (i.e., public headers). This avoids inheriting warnings from the LLVM codebase, which turn into compilation errors when compiling the SYCL runtime with `SYCL_ENABLE_WERROR=ON`. Signed-off-by: Lukas Sommer <[email protected]>
1 parent c539fde commit ded5db5

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

sycl-fusion/jit-compiler/include/JITContext.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
#ifndef SYCL_FUSION_JIT_COMPILER_JITCONTEXT_H
1010
#define SYCL_FUSION_JIT_COMPILER_JITCONTEXT_H
1111

12-
#include "llvm/IR/LLVMContext.h"
1312
#include <mutex>
1413
#include <shared_mutex>
1514
#include <unordered_map>
1615

1716
#include "Kernel.h"
1817
#include "Parameter.h"
1918

19+
namespace llvm {
20+
class LLVMContext;
21+
} // namespace llvm
22+
2023
namespace jit_compiler {
2124

2225
///

sycl-fusion/jit-compiler/include/KernelFusion.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
#include "Kernel.h"
1414
#include "Options.h"
1515
#include "Parameter.h"
16+
#include <cassert>
1617
#include <string>
18+
#include <variant>
1719
#include <vector>
1820

1921
namespace jit_compiler {

sycl-fusion/jit-compiler/lib/JITContext.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "JITContext.h"
10+
#include "llvm/IR/LLVMContext.h"
1011

1112
using namespace jit_compiler;
1213

0 commit comments

Comments
 (0)