Skip to content

Commit 88c07fe

Browse files
committed
rustc_llvm: update for llvm/llvm-project@2ae968a
Just a simple header move. @rustbot label: +llvm-main
1 parent 3a22be3 commit 88c07fe

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "llvm/Target/TargetMachine.h"
2626
#include "llvm/Target/TargetOptions.h"
2727
#include "llvm/Transforms/IPO.h"
28-
#include "llvm/Transforms/Instrumentation.h"
2928
#include "llvm/Transforms/Scalar.h"
3029

3130
#define LLVM_VERSION_GE(major, minor) \
@@ -34,6 +33,12 @@
3433

3534
#define LLVM_VERSION_LT(major, minor) (!LLVM_VERSION_GE((major), (minor)))
3635

36+
#if LLVM_VERSION_GE(20, 0)
37+
#include "llvm/Transforms/Utils/Instrumentation.h"
38+
#else
39+
#include "llvm/Transforms/Instrumentation.h"
40+
#endif
41+
3742
#include "llvm/IR/LegacyPassManager.h"
3843

3944
#include "llvm/Bitcode/BitcodeReader.h"

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
#include "llvm/TargetParser/Host.h"
4040
#endif
4141
#include "llvm/Support/TimeProfiler.h"
42+
#if LLVM_VERSION_GE(20, 0)
43+
#include "llvm/Transforms/Utils/Instrumentation.h"
44+
#else
4245
#include "llvm/Transforms/Instrumentation.h"
46+
#endif
4347
#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
4448
#include "llvm/Transforms/Instrumentation/DataFlowSanitizer.h"
4549
#if LLVM_VERSION_GE(19, 0)

0 commit comments

Comments
 (0)