Skip to content

Commit 232213d

Browse files
authored
Rollup merge of rust-lang#107764 - maurer:llvm-16, r=cuviper
llvm-16: Use Triple.h from new header location. LLVM 16 has moved Triple.h from ADT and into TargetParser. LLVM [landed a commit](llvm/llvm-project@62c7f03) this morning moving the header. This change should make rustc continue to build against LLVM main.
2 parents d044c1b + 147c51e commit 232213d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "llvm/ADT/ArrayRef.h"
55
#include "llvm/ADT/DenseSet.h"
66
#include "llvm/ADT/SmallVector.h"
7-
#include "llvm/ADT/Triple.h"
87
#include "llvm/Analysis/Lint.h"
98
#include "llvm/Analysis/Passes.h"
109
#include "llvm/IR/IRBuilder.h"
@@ -44,6 +43,12 @@
4443
#include "llvm/IR/IRPrintingPasses.h"
4544
#include "llvm/Linker/Linker.h"
4645

46+
#if LLVM_VERSION_GE(16, 0)
47+
#include "llvm/TargetParser/Triple.h"
48+
#else
49+
#include "llvm/ADT/Triple.h"
50+
#endif
51+
4752
extern "C" void LLVMRustSetLastError(const char *);
4853

4954
enum class LLVMRustResult { Success, Failure };

0 commit comments

Comments
 (0)