This is an archive of the discontinued LLVM Phabricator instance.

[llgo] clear data layout before adding module to JIT
AbandonedPublic

Authored by axw on Sep 3 2015, 6:39 PM.

Details

Reviewers
pcc
Summary

r242414 made the ExecutionEngine the owner of the data
layout, which broke llgoi (runtime assertion in
MCJIT::generateCodeForModule due to data layout mismatch).
Before adding modules to the engine, clear the data layout
so it will be set by the engine.

Diff Detail

Event Timeline

axw updated this revision to Diff 34008.Sep 3 2015, 6:39 PM
axw retitled this revision from to [llgo] clear data layout before adding module to JIT.
axw updated this object.
axw added a reviewer: pcc.
axw added a subscriber: llvm-commits.
mehdi_amini added inline comments.
cmd/llgoi/llgoi.go
155

There i something fishy, why is the datalayout set to something else than the target in the first place?

axw abandoned this revision.Sep 4 2015, 1:14 AM
axw added inline comments.
cmd/llgoi/llgoi.go
155

http://llvm.org/klaus/llgo/blob/master/irgen/targets.go#L-43

I don't recall how that came to be, but most likely that needs to be fixed. I'll close this and look into that, thanks.