[PATCH] D18173: bindings/go: reinstate TargetMachine.TargetData

Andrew Wilkins via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 21:58:05 PDT 2016

axw updated this revision to Diff 50693.
axw added a comment.

Rename TargetMachine.TargetData to TargetMachine.CreateTargetData



Index: bindings/go/llvm/target.go
--- bindings/go/llvm/target.go
+++ bindings/go/llvm/target.go
@@ -254,6 +254,13 @@
+// CreateTargetData returns a new TargetData describing the TargetMachine's
+// data layout. The returned TargetData is owned by the caller, who is
+// responsible for disposing of it by calling the TargetData.Dispose method.
+func (tm TargetMachine) CreateTargetData() TargetData {
+	return TargetData{C.LLVMCreateTargetDataLayout(tm.C)}
 // Triple returns the triple describing the machine (arch-vendor-os).
 func (tm TargetMachine) Triple() string {
 	cstr := C.LLVMGetTargetMachineTriple(tm.C)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18173.50693.patch
Type: text/x-patch
Size: 703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160315/3738eba0/attachment.bin>

More information about the llvm-commits mailing list