[llvm] r340148 - [bindings/go] Add coroutine passes

whitequark via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 19 16:40:05 PDT 2018


Author: whitequark
Date: Sun Aug 19 16:40:05 2018
New Revision: 340148

URL: http://llvm.org/viewvc/llvm-project?rev=340148&view=rev
Log:
[bindings/go] Add coroutine passes

Add Go bindings for CoroEarly, CoroSplit, CoroElide and CoroCleanup.

Differential Revision: https://reviews.llvm.org/D50951

Added:
    llvm/trunk/bindings/go/llvm/transforms_coroutines.go
Modified:
    llvm/trunk/tools/llvm-go/llvm-go.go

Added: llvm/trunk/bindings/go/llvm/transforms_coroutines.go
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/transforms_coroutines.go?rev=340148&view=auto
==============================================================================
--- llvm/trunk/bindings/go/llvm/transforms_coroutines.go (added)
+++ llvm/trunk/bindings/go/llvm/transforms_coroutines.go Sun Aug 19 16:40:05 2018
@@ -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) }

Modified: llvm/trunk/tools/llvm-go/llvm-go.go
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-go/llvm-go.go?rev=340148&r1=340147&r2=340148&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-go/llvm-go.go (original)
+++ llvm/trunk/tools/llvm-go/llvm-go.go Sun Aug 19 16:40:05 2018
@@ -50,6 +50,7 @@ var components = []string{
 	"bitwriter",
 	"codegen",
 	"core",
+	"coroutines",
 	"debuginfodwarf",
 	"executionengine",
 	"instrumentation",




More information about the llvm-commits mailing list