aboutsummaryrefslogtreecommitdiff
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
commitfdca0c6d2ea9b2d30965f8f170d705a858c43b9d (patch)
tree98e81fed8fb61f6f068f3d518f5d021c52030e5b
parentc438ac2352841961031c60e5739ee16b464f789a (diff)
downloadllvm-fdca0c6d2ea9b2d30965f8f170d705a858c43b9d.zip
llvm-fdca0c6d2ea9b2d30965f8f170d705a858c43b9d.tar.gz
llvm-fdca0c6d2ea9b2d30965f8f170d705a858c43b9d.tar.bz2
[bindings/go] Add coroutine passes
Add Go bindings for CoroEarly, CoroSplit, CoroElide and CoroCleanup. Differential Revision: https://reviews.llvm.org/D50951 llvm-svn: 340148
-rw-r--r--llvm/bindings/go/llvm/transforms_coroutines.go24
-rw-r--r--llvm/tools/llvm-go/llvm-go.go1
2 files changed, 25 insertions, 0 deletions
diff --git a/llvm/bindings/go/llvm/transforms_coroutines.go b/llvm/bindings/go/llvm/transforms_coroutines.go
new file mode 100644
index 0000000..9486fcb
--- /dev/null
+++ b/llvm/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) }
diff --git a/llvm/tools/llvm-go/llvm-go.go b/llvm/tools/llvm-go/llvm-go.go
index 4d65de6..8215483 100644
--- a/llvm/tools/llvm-go/llvm-go.go
+++ b/llvm/tools/llvm-go/llvm-go.go
@@ -50,6 +50,7 @@ var components = []string{
"bitwriter",
"codegen",
"core",
+ "coroutines",
"debuginfodwarf",
"executionengine",
"instrumentation",