Skip to content

Commit

Permalink
Rollup merge of #107764 - maurer:llvm-16, r=cuviper
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr authored Feb 7, 2023
2 parents d044c1b + 147c51e commit 232213d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 };
Expand Down

0 comments on commit 232213d

Please sign in to comment.