This is an archive of the discontinued LLVM Phabricator instance.

Redirect DataLayout from TargetMachine to Module in ComputeValueVTs()
ClosedPublic

Authored by mehdi_amini on Jul 7 2015, 5:35 PM.

Details

Summary

Avoid using the TargetMachine owned DataLayout and use the Module owned
one instead. This requires passing the DataLayout up the stack to
ComputeValueVTs().

This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.

Diff Detail

Event Timeline

mehdi_amini updated this revision to Diff 29226.Jul 7 2015, 5:35 PM
mehdi_amini retitled this revision from to Redirect DataLayout from TargetMachine to Module in ComputeValueVTs().
mehdi_amini updated this object.
mehdi_amini added a reviewer: echristo.

Did you run clang-format on the patch? If not, please do. Otherwise, seems reasonable to me. I'll see if Eric wants to comment before giving the LGTM.

Very minor cleaning (use DL cached member instead of calling getDataLayout on MF)

echristo accepted this revision.Jul 8 2015, 1:29 PM
echristo edited edge metadata.

LGTM. Thanks!

-eric

This revision is now accepted and ready to land.Jul 8 2015, 1:29 PM