From b52e8dcdd124b880ec626059dbfd2ef38c7c4f85 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 19 Aug 2018 23:40:05 +0000 Subject: [bindings/go] Add coroutine passes Add Go bindings for CoroEarly, CoroSplit, CoroElide and CoroCleanup. Differential Revision: https://reviews.llvm.org/D50951 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340148 91177308-0d34-0410-b5e6-96231b3b80d8 --- bindings/go/llvm/transforms_coroutines.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 bindings/go/llvm/transforms_coroutines.go (limited to 'bindings') diff --git a/bindings/go/llvm/transforms_coroutines.go b/bindings/go/llvm/transforms_coroutines.go new file mode 100644 index 000000000000..9486fcb249cb --- /dev/null +++ b/bindings/go/llvm/transforms_coroutines.go @@ -0,0 +1,24 @@ +//===- transforms_coroutines.go - Bindings for coroutines -----------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines bindings for the coroutines component. +// +//===----------------------------------------------------------------------===// + +package llvm + +/* +#include "llvm-c/Transforms/Coroutines.h" +*/ +import "C" + +func (pm PassManager) AddCoroEarlyPass() { C.LLVMAddCoroEarlyPass(pm.C) } +func (pm PassManager) AddCoroSplitPass() { C.LLVMAddCoroSplitPass(pm.C) } +func (pm PassManager) AddCoroElidePass() { C.LLVMAddCoroElidePass(pm.C) } +func (pm PassManager) AddCoroCleanupPass() { C.LLVMAddCoroCleanupPass(pm.C) } -- cgit v1.2.1