We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01d061f commit acc9efaCopy full SHA for acc9efa
src/rustllvm/PassWrapper.cpp
@@ -22,6 +22,9 @@
22
#include "llvm/Target/TargetSubtargetInfo.h"
23
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
24
25
+#if LLVM_VERSION_GE(4, 0)
26
+#include "llvm/Transforms/IPO/AlwaysInliner.h"
27
+#endif
28
29
#include "llvm-c/Transforms/PassManagerBuilder.h"
30
@@ -539,7 +542,11 @@ LLVMRustPrintPasses() {
539
542
540
543
extern "C" void
541
544
LLVMRustAddAlwaysInlinePass(LLVMPassManagerBuilderRef PMB, bool AddLifetimes) {
545
546
+ unwrap(PMB)->Inliner = llvm::createAlwaysInlinerLegacyPass(AddLifetimes);
547
+#else
548
unwrap(PMB)->Inliner = createAlwaysInlinerPass(AddLifetimes);
549
550
}
551
552
0 commit comments