From: Matthew Maurer Date: Tue, 7 Feb 2023 14:48:54 +0000 (-0800) Subject: llvm-16: Use Triple.h from new header location. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=147c51e17dfc6b22deb349297fc7d2bdad19cd4f;p=rust.git llvm-16: Use Triple.h from new header location. LLVM 16 has moved Triple.h from ADT and into TargetParser --- 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 };