Skip to content

Commit 9faa155

Browse files
committed
[multi_llvm] Add Triple.h wrapper
Triple.h moves in LLVM 17, so this provides a stable point with which to include that header.
1 parent bded8b1 commit 9faa155

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_pipeline/include/multi_llvm/multi_llvm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818

1919
#include <llvm/ADT/ArrayRef.h>
2020
#include <llvm/ADT/SmallVector.h>
21-
#include <llvm/ADT/Triple.h>
2221
#include <llvm/Analysis/IVDescriptors.h>
2322
#include <llvm/Analysis/TargetLibraryInfo.h>
2423
#include <llvm/IR/BasicBlock.h>
2524
#include <llvm/IR/IRBuilder.h>
2625
#include <llvm/IR/Instructions.h>
2726
#include <llvm/Transforms/Utils/Cloning.h>
2827
#include <multi_llvm/llvm_version.h>
28+
#include <multi_llvm/triple.h>
2929

3030
namespace multi_llvm {
3131

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (C) Codeplay Software Limited
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License") with LLVM
4+
// Exceptions; you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://github.com/codeplaysoftware/oneapi-construction-kit/blob/main/LICENSE.txt
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11+
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12+
// License for the specific language governing permissions and limitations
13+
// under the License.
14+
//
15+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
16+
#ifndef MULTI_LLVM_TRIPLE_H_INCLUDED
17+
#define MULTI_LLVM_TRIPLE_H_INCLUDED
18+
19+
#include <multi_llvm/llvm_version.h>
20+
21+
#if LLVM_VERSION_MAJOR >= 17
22+
#include <llvm/TargetParser/Triple.h>
23+
#else
24+
#include <llvm/ADT/Triple.h>
25+
#endif
26+
27+
#endif // MULTI_LLVM_TRIPLE_H_INCLUDED

llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/source/vector_target_info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
//
1515
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
1616

17-
#include <llvm/ADT/Triple.h>
1817
#include <llvm/Analysis/TargetTransformInfo.h>
1918
#include <llvm/IR/IRBuilder.h>
2019
#include <llvm/IR/Instructions.h>
2120
#include <llvm/MC/TargetRegistry.h>
2221
#include <llvm/Target/TargetMachine.h>
2322
#include <multi_llvm/creation_apis_helper.h>
2423
#include <multi_llvm/opaque_pointers.h>
24+
#include <multi_llvm/triple.h>
2525
#include <multi_llvm/vector_type_helper.h>
2626

2727
#include "debugging.h"

0 commit comments

Comments
 (0)