Index: bindings/go/llvm/transforms_pmbuilder.go =================================================================== --- bindings/go/llvm/transforms_pmbuilder.go +++ bindings/go/llvm/transforms_pmbuilder.go @@ -66,3 +66,7 @@ func (pmb PassManagerBuilder) UseInlinerWithThreshold(threshold uint) { C.LLVMPassManagerBuilderUseInlinerWithThreshold(pmb.C, C.uint(threshold)) } + +func (pmb PassManagerBuilder) AddCoroutinePassesToExtensionPoints() { + C.LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(pmb.C); +} Index: include/llvm-c/Transforms/PassManagerBuilder.h =================================================================== --- include/llvm-c/Transforms/PassManagerBuilder.h +++ include/llvm-c/Transforms/PassManagerBuilder.h @@ -79,6 +79,9 @@ LLVMBool Internalize, LLVMBool RunInliner); +/** See llvm::addCoroutinePassesToExtensionPoints. */ +void LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(LLVMPassManagerBuilderRef PMB); + /** * @} */ Index: lib/Transforms/IPO/PassManagerBuilder.cpp =================================================================== --- lib/Transforms/IPO/PassManagerBuilder.cpp +++ lib/Transforms/IPO/PassManagerBuilder.cpp @@ -30,6 +30,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h" +#include "llvm/Transforms/Coroutines.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/ForceFunctionAttrs.h" #include "llvm/Transforms/IPO/FunctionAttrs.h" @@ -1053,3 +1054,9 @@ Builder->populateLTOPassManager(*LPM); } + +void +LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(LLVMPassManagerBuilderRef PMB) { + PassManagerBuilder *Builder = unwrap(PMB); + addCoroutinePassesToExtensionPoints(*Builder); +}