This is an archive of the discontinued LLVM Phabricator instance.

Move most user of TargetMachine::getDataLayout to the Module one
ClosedPublic

Authored by mehdi_amini on Jul 9 2015, 3:55 PM.

Details

Summary

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.

This patch is quite boring overall, except for some uglyness in
ASMPrinter which has a getDataLayout function but has some clients
that use it without a Module (llmv-dsymutil, llvm-dwarfdump), so
some methods are taking a DataLayout as parameter.

Diff Detail

Event Timeline

mehdi_amini updated this revision to Diff 29408.Jul 9 2015, 3:55 PM
mehdi_amini retitled this revision from to Move most user of TargetMachine::getDataLayout to the Module one.
mehdi_amini updated this object.
mehdi_amini added a reviewer: echristo.
echristo edited edge metadata.Jul 10 2015, 6:16 PM

Would it make more sense to have the constructor for AsmPrinter take a DataLayout?

-eric

echristo accepted this revision.Jul 15 2015, 10:45 PM
echristo edited edge metadata.

(The answer is "yes, but... it's hard right now")

Let's just do it. It's a good incremental step forward. :)

-eric

This revision is now accepted and ready to land.Jul 15 2015, 10:45 PM