diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-02-07 17:57:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-07 17:57:18 +0100 |
| commit | 232213dd77515eb8ca3b4ff3ca706bbbf0b243ed (patch) | |
| tree | c6da9f4706ebd9aaf8456682c6b2d6aacc565405 /compiler/rustc_llvm/llvm-wrapper | |
| parent | d044c1bde49f11f4a19bd9046786986c11935b22 (diff) | |
| parent | 147c51e17dfc6b22deb349297fc7d2bdad19cd4f (diff) | |
| download | rust-232213dd77515eb8ca3b4ff3ca706bbbf0b243ed.tar.gz rust-232213dd77515eb8ca3b4ff3ca706bbbf0b243ed.zip | |
Rollup merge of #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](https://github.com/llvm/llvm-project/commit/62c7f035b4392c1933550eead6ddab35122720bc) this morning moving the header. This change should make rustc continue to build against LLVM main.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h b/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h index 727cfc4416e..9146a3739b2 100644 --- a/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h +++ b/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h @@ -4,7 +4,6 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/Triple.h" #include "llvm/Analysis/Lint.h" #include "llvm/Analysis/Passes.h" #include "llvm/IR/IRBuilder.h" @@ -44,6 +43,12 @@ #include "llvm/IR/IRPrintingPasses.h" #include "llvm/Linker/Linker.h" +#if LLVM_VERSION_GE(16, 0) +#include "llvm/TargetParser/Triple.h" +#else +#include "llvm/ADT/Triple.h" +#endif + extern "C" void LLVMRustSetLastError(const char *); enum class LLVMRustResult { Success, Failure }; |
