Commit b018c64ca2

Andrew Kelley <superjoe30@gmail.com>
2018-02-26 00:09:39
add coroutine LLVM passes
1 parent fe354eb
Changed files (1)
src/zig_llvm.cpp
@@ -32,6 +32,7 @@
 #include <llvm/Support/TargetParser.h>
 #include <llvm/Support/raw_ostream.h>
 #include <llvm/Target/TargetMachine.h>
+#include <llvm/Transforms/Coroutines.h>
 #include <llvm/Transforms/IPO.h>
 #include <llvm/Transforms/IPO/PassManagerBuilder.h>
 #include <llvm/Transforms/IPO/AlwaysInliner.h>
@@ -129,6 +130,8 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM
         PMBuilder->Inliner = createFunctionInliningPass(PMBuilder->OptLevel, PMBuilder->SizeLevel, false);
     }
 
+    addCoroutinePassesToExtensionPoints(*PMBuilder);
+
     // Set up the per-function pass manager.
     legacy::FunctionPassManager FPM = legacy::FunctionPassManager(module);
     auto tliwp = new(std::nothrow) TargetLibraryInfoWrapperPass(tlii);