llvm.org GIT mirror llvm / 255ca4b
bindings/go: reinstate TargetMachine.TargetData Summary: 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. Reviewers: deadalnix, pcc Subscribers: cierniak, llvm-commits, axw Differential Revision: http://reviews.llvm.org/D18173 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263530 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Wilkins 4 years ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
253253 return
254254 }
255255
256 // CreateTargetData returns a new TargetData describing the TargetMachine's
257 // data layout. The returned TargetData is owned by the caller, who is
258 // responsible for disposing of it by calling the TargetData.Dispose method.
259 func (tm TargetMachine) CreateTargetData() TargetData {
260 return TargetData{C.LLVMCreateTargetDataLayout(tm.C)}
261 }
262
256263 // Triple returns the triple describing the machine (arch-vendor-os).
257264 func (tm TargetMachine) Triple() string {
258265 cstr := C.LLVMGetTargetMachineTriple(tm.C)