| ... | @@ -32,6 +32,7 @@ | ... | @@ -32,6 +32,7 @@ |
| 32 | #include <llvm/Support/TargetParser.h> | 32 | #include <llvm/Support/TargetParser.h> |
| 33 | #include <llvm/Support/raw_ostream.h> | 33 | #include <llvm/Support/raw_ostream.h> |
| 34 | #include <llvm/Target/TargetMachine.h> | 34 | #include <llvm/Target/TargetMachine.h> |
| | 35 | #include <llvm/Transforms/Coroutines.h> |
| 35 | #include <llvm/Transforms/IPO.h> | 36 | #include <llvm/Transforms/IPO.h> |
| 36 | #include <llvm/Transforms/IPO/PassManagerBuilder.h> | 37 | #include <llvm/Transforms/IPO/PassManagerBuilder.h> |
| 37 | #include <llvm/Transforms/IPO/AlwaysInliner.h> | 38 | #include <llvm/Transforms/IPO/AlwaysInliner.h> |
| ... | @@ -129,6 +130,8 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM | ... | @@ -129,6 +130,8 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM |
| 129 | PMBuilder->Inliner = createFunctionInliningPass(PMBuilder->OptLevel, PMBuilder->SizeLevel, false); | 130 | PMBuilder->Inliner = createFunctionInliningPass(PMBuilder->OptLevel, PMBuilder->SizeLevel, false); |
| 130 | } | 131 | } |
| 131 | | 132 | |
| | 133 | addCoroutinePassesToExtensionPoints(*PMBuilder); |
| | 134 | |
| 132 | // Set up the per-function pass manager. | 135 | // Set up the per-function pass manager. |
| 133 | legacy::FunctionPassManager FPM = legacy::FunctionPassManager(module); | 136 | legacy::FunctionPassManager FPM = legacy::FunctionPassManager(module); |
| 134 | auto tliwp = new(std::nothrow) TargetLibraryInfoWrapperPass(tlii); | 137 | auto tliwp = new(std::nothrow) TargetLibraryInfoWrapperPass(tlii); |