mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
[LLVM 4.0] Update AlwaysInliner pass header and constructor
This commit is contained in:
parent
01d061fdc0
commit
acc9efa528
@ -22,6 +22,9 @@
|
|||||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||||
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
|
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
|
||||||
|
|
||||||
|
#if LLVM_VERSION_GE(4, 0)
|
||||||
|
#include "llvm/Transforms/IPO/AlwaysInliner.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "llvm-c/Transforms/PassManagerBuilder.h"
|
#include "llvm-c/Transforms/PassManagerBuilder.h"
|
||||||
|
|
||||||
@ -539,7 +542,11 @@ LLVMRustPrintPasses() {
|
|||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
LLVMRustAddAlwaysInlinePass(LLVMPassManagerBuilderRef PMB, bool AddLifetimes) {
|
LLVMRustAddAlwaysInlinePass(LLVMPassManagerBuilderRef PMB, bool AddLifetimes) {
|
||||||
|
#if LLVM_VERSION_GE(4, 0)
|
||||||
|
unwrap(PMB)->Inliner = llvm::createAlwaysInlinerLegacyPass(AddLifetimes);
|
||||||
|
#else
|
||||||
unwrap(PMB)->Inliner = createAlwaysInlinerPass(AddLifetimes);
|
unwrap(PMB)->Inliner = createAlwaysInlinerPass(AddLifetimes);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
|
Loading…
Reference in New Issue
Block a user