This is an archive of the discontinued LLVM Phabricator instance.

bindings/go: reinstate TargetMachine.TargetData
ClosedPublic

Authored by axw on Mar 14 2016, 8:19 PM.

Details

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.

Diff Detail

Event Timeline

axw updated this revision to Diff 50691.Mar 14 2016, 8:19 PM
axw retitled this revision from to bindings/go: reinstate TargetMachine.TargetData.
axw updated this object.
axw added reviewers: pcc, deadalnix.
axw added a subscriber: llvm-commits.
pcc edited edge metadata.Mar 14 2016, 9:11 PM

Maybe this should be renamed CreateTargetData to emphasize that the TargetData is owned by the caller. We probably need to update the code in llgo for the new ownership as well.

deadalnix edited edge metadata.Mar 14 2016, 9:31 PM

I really don't know much about go. If @pcc don't have the bandwidth to review, I'll dig into this, but I'd prefer to defers to someone more experienced.

axw updated this revision to Diff 50693.Mar 14 2016, 9:58 PM
axw edited edge metadata.

Rename TargetMachine.TargetData to TargetMachine.CreateTargetData

axw added a comment.Mar 14 2016, 9:59 PM
In D18173#375236, @pcc wrote:

Maybe this should be renamed CreateTargetData to emphasize that the TargetData is owned by the caller. We probably need to update the code in llgo for the new ownership as well.

Done. Updated D15188 with the corresponding changes.

pcc accepted this revision.Mar 14 2016, 10:03 PM
pcc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 14 2016, 10:03 PM
axw closed this revision.Mar 14 2016, 10:09 PM