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

Andrew Wilkins via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 20:19:12 PDT 2016

axw created this revision.
axw added reviewers: pcc, deadalnix.
axw added a subscriber: llvm-commits.
Herald added a subscriber: axw.

LLVMGetTargetDataLayout was removed from the C API,
and then TargetMachine.TargetData was removed. Later,
LLVMCreateTargetMachineData was added to the C API,
and we now expose this via the Go API.



Index: bindings/go/llvm/target.go
--- bindings/go/llvm/target.go
+++ bindings/go/llvm/target.go
@@ -254,6 +254,11 @@
+// TargetData returns the TargetData describing the TargetMachine's data layout.
+func (tm TargetMachine) TargetData() 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.50691.patch
Type: text/x-patch
Size: 552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160315/1ceb2ee5/attachment.bin>

More information about the llvm-commits mailing list