This is an archive of the discontinued LLVM Phabricator instance.

Redirect pointerSize query from the to the TargetMachine in ASMPrinter
ClosedPublic

Authored by mehdi_amini on Jul 9 2015, 12:29 PM.

Details

Summary

Because llvm-dsymutil is using ASMPrinter without any MachineFunction
of Module available.

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 retitled this revision from to Redirect pointerSize query from the to the TargetMachine in ASMPrinter.
mehdi_amini updated this object.
mehdi_amini added a reviewer: echristo.
echristo edited edge metadata.Jul 10 2015, 9:46 AM

Hrm. This one seems a little odd. What's the ultimate direction for this? Perhaps have the AsmPrinter take a DataLayout on construction (my first thoughts at least).

-eric

I would rather have the ASM printer have a reference to a DataLayout as well, I am afraid of the extend of the changes required to do it :(

After spending a few hours on it, I can't "unspagghetify" it. It seems there is too much history attached to it and my impression is that it requires a clean rewrite.

echristo accepted this revision.Jul 14 2015, 9:30 PM
echristo edited edge metadata.

OK. We can look into it. This is a pretty nice cleanup to start with at least.

-eric

This revision is now accepted and ready to land.Jul 14 2015, 9:30 PM