summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2018-08-19 23:40:05 +0000
committerwhitequark <whitequark@whitequark.org>2018-08-19 23:40:05 +0000
commitb52e8dcdd124b880ec626059dbfd2ef38c7c4f85 (patch)
treece410b633480b6dc0cbc82d48f68b49291a32eba /bindings
parent7c767e2cf3df4e1a5fbef7d75089d9c4250b61b7 (diff)
downloadllvm-b52e8dcdd124b880ec626059dbfd2ef38c7c4f85.tar.gz
[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
Diffstat (limited to 'bindings')
-rw-r--r--bindings/go/llvm/transforms_coroutines.go24
1 files changed, 24 insertions, 0 deletions
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) }