Skip to content

Commit e3c3f4a

Browse files
committed
RustWrapper: adapt for an LLVM API change
No functional changes intended. The LLVM commit llvm/llvm-project@89b5706 moved TargetRegistry.(h|cpp) from Support to MC. This adapts RustWrapper accordingly.
1 parent 5e02151 commit e3c3f4a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "llvm/Support/Host.h"
1919
#include "llvm/Support/Memory.h"
2020
#include "llvm/Support/SourceMgr.h"
21-
#include "llvm/Support/TargetRegistry.h"
2221
#include "llvm/Support/TargetSelect.h"
2322
#include "llvm/Support/Timer.h"
2423
#include "llvm/Support/raw_ostream.h"

Diff for: compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
#include "llvm/Support/CBindingWrapping.h"
2222
#include "llvm/Support/FileSystem.h"
2323
#include "llvm/Support/Host.h"
24+
#if LLVM_VERSION_LT(14, 0)
25+
#include "llvm/Support/TargetRegistry.h"
26+
#else
27+
#include "llvm/MC/TargetRegistry.h"
28+
#endif
2429
#include "llvm/Target/TargetMachine.h"
2530
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
2631
#include "llvm/Transforms/IPO/AlwaysInliner.h"

0 commit comments

Comments
 (0)