This is an archive of the discontinued LLVM Phabricator instance.

Remove DataLayout from TargetLoweringObjectFile, redirect to Module
ClosedPublic

Authored by mehdi_amini on Jul 9 2015, 12:29 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.

Diff Detail

Event Timeline

mehdi_amini retitled this revision from to Remove DataLayout from TargetLoweringObjectFile, redirect to Module.
mehdi_amini updated this object.
mehdi_amini added a reviewer: echristo.
mehdi_amini updated this revision to Diff 29391.Jul 9 2015, 2:25 PM

Update taking WebAssembly backend into account (the only experimental one AFAIK).

Also move DL as first parameter for consistency with all the other changes

mehdi_amini updated this revision to Diff 29393.Jul 9 2015, 2:35 PM

clang-format

echristo edited edge metadata.Jul 10 2015, 9:44 AM

One inline question, LGTM otherwise though.

-eric

lib/CodeGen/AsmPrinter/AsmPrinter.cpp
140

Is this going to have problems when you don't have a module (ala some of the other uses?).

mehdi_amini added inline comments.Jul 13 2015, 11:06 AM
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
140

They never call this method (if they do, they're doomed).

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

One small inline request then go for it. We can look at refactors later.

-eric

lib/CodeGen/AsmPrinter/AsmPrinter.cpp
140

Let's grab an assert for MMI to make it clear if something does manage to call it what happened.

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